Client
athena | R Documentation |
Amazon Athena¶
Description¶
Amazon Athena is an interactive query service that lets you use standard SQL to analyze data directly in Amazon S3. You can point Athena at your data in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is serverless, so there is no infrastructure to set up or manage. You pay only for the queries you run. Athena scales automatically—executing queries in parallel—so results are fast, even with large datasets and complex queries. For more information, see What is Amazon Athena in the Amazon Athena User Guide.
If you connect to Athena using the JDBC driver, use version 1.1.0 of the driver or later with the Amazon Athena API. Earlier version drivers do not support the API. For more information and to download the driver, see Accessing Amazon Athena with JDBC.
Usage¶
Arguments¶
config
Optional configuration of credentials, endpoint, and/or region.
credentials:
creds:
access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
profile: The name of a profile to use. If not given, then the default profile is used.
anonymous: Set anonymous credentials.
endpoint: The complete URL to use for the constructed client.
region: The AWS Region used in instantiating the client.
close_connection: Immediately close all HTTP connections.
timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.
s3_force_path_style: Set this to
true
to force the request to use path-style addressing, i.e.http://s3.amazonaws.com/BUCKET/KEY
.sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html
credentials
Optional credentials shorthand for the config parameter
creds:
access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
profile: The name of a profile to use. If not given, then the default profile is used.
anonymous: Set anonymous credentials.
endpoint
Optional shorthand for complete URL to use for the constructed client.
region
Optional shorthand for AWS Region used in instantiating the client.
Value¶
A client for the service. You can call the service's operations using
syntax like svc$operation(...)
, where svc
is the name you've
assigned to the client. The available operations are listed in the
Operations section.
Service syntax¶
svc <- athena(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string",
close_connection = "logical",
timeout = "numeric",
s3_force_path_style = "logical",
sts_regional_endpoint = "string"
),
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string"
)
Operations¶
- batch_get_named_query
- Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings
- batch_get_prepared_statement
- Returns the details of a single prepared statement or a list of up to 256 prepared statements for the array of prepared statement names that you provide
- batch_get_query_execution
- Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings
- cancel_capacity_reservation
- Cancels the capacity reservation with the specified name
- create_capacity_reservation
- Creates a capacity reservation with the specified name and number of requested data processing units
- create_data_catalog
- Creates (registers) a data catalog with the specified name and properties
- create_named_query
- Creates a named query in the specified workgroup
- create_notebook
- Creates an empty ipynb file in the specified Apache Spark enabled workgroup
- create_prepared_statement
- Creates a prepared statement for use with SQL queries in Athena
- create_presigned_notebook_url
- Gets an authentication token and the URL at which the notebook can be accessed
- create_work_group
- Creates a workgroup with the specified name
- delete_capacity_reservation
- Deletes a cancelled capacity reservation
- delete_data_catalog
- Deletes a data catalog
- delete_named_query
- Deletes the named query if you have access to the workgroup in which the query was saved
- delete_notebook
- Deletes the specified notebook
- delete_prepared_statement
- Deletes the prepared statement with the specified name from the specified workgroup
- delete_work_group
- Deletes the workgroup with the specified name
- export_notebook
- Exports the specified notebook and its metadata
- get_calculation_execution
- Describes a previously submitted calculation execution
- get_calculation_execution_code
- Retrieves the unencrypted code that was executed for the calculation
- get_calculation_execution_status
- Gets the status of a current calculation
- get_capacity_assignment_configuration
- Gets the capacity assignment configuration for a capacity reservation, if one exists
- get_capacity_reservation
- Returns information about the capacity reservation with the specified name
- get_database
- Returns a database object for the specified database and data catalog
- get_data_catalog
- Returns the specified data catalog
- get_named_query
- Returns information about a single query
- get_notebook_metadata
- Retrieves notebook metadata for the specified notebook ID
- get_prepared_statement
- Retrieves the prepared statement with the specified name from the specified workgroup
- get_query_execution
- Returns information about a single execution of a query if you have access to the workgroup in which the query ran
- get_query_results
- Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3
- get_query_runtime_statistics
- Returns query execution runtime statistics related to a single execution of a query if you have access to the workgroup in which the query ran
- get_session
- Gets the full details of a previously created session, including the session status and configuration
- get_session_status
- Gets the current status of a session
- get_table_metadata
- Returns table metadata for the specified catalog, database, and table
- get_work_group
- Returns information about the workgroup with the specified name
- import_notebook
- Imports a single ipynb file to a Spark enabled workgroup
- list_application_dpu_sizes
- Returns the supported DPU sizes for the supported application runtimes (for example, Athena notebook version 1)
- list_calculation_executions
- Lists the calculations that have been submitted to a session in descending order
- list_capacity_reservations
- Lists the capacity reservations for the current account
- list_databases
- Lists the databases in the specified data catalog
- list_data_catalogs
- Lists the data catalogs in the current Amazon Web Services account
- list_engine_versions
- Returns a list of engine versions that are available to choose from, including the Auto option
- list_executors
- Lists, in descending order, the executors that joined a session
- list_named_queries
- Provides a list of available query IDs only for queries saved in the specified workgroup
- list_notebook_metadata
- Displays the notebook files for the specified workgroup in paginated format
- list_notebook_sessions
- Lists, in descending order, the sessions that have been created in a notebook that are in an active state like CREATING, CREATED, IDLE or BUSY
- list_prepared_statements
- Lists the prepared statements in the specified workgroup
- list_query_executions
- Provides a list of available query execution IDs for the queries in the specified workgroup
- list_sessions
- Lists the sessions in a workgroup that are in an active state like CREATING, CREATED, IDLE, or BUSY
- list_table_metadata
- Lists the metadata for the tables in the specified data catalog database
- list_tags_for_resource
- Lists the tags associated with an Athena resource
- list_work_groups
- Lists available workgroups for the account
- put_capacity_assignment_configuration
- Puts a new capacity assignment configuration for a specified capacity reservation
- start_calculation_execution
- Submits calculations for execution within a session
- start_query_execution
- Runs the SQL query statements contained in the Query
- start_session
- Creates a session for running calculations within a workgroup
- stop_calculation_execution
- Requests the cancellation of a calculation
- stop_query_execution
- Stops a query execution
- tag_resource
- Adds one or more tags to an Athena resource
- terminate_session
- Terminates an active session
- untag_resource
- Removes one or more tags from an Athena resource
- update_capacity_reservation
- Updates the number of requested data processing units for the capacity reservation with the specified name
- update_data_catalog
- Updates the data catalog that has the specified name
- update_named_query
- Updates a NamedQuery object
- update_notebook
- Updates the contents of a Spark notebook
- update_notebook_metadata
- Updates the metadata for a notebook
- update_prepared_statement
- Updates a prepared statement
- update_work_group
- Updates the workgroup with the specified name