Learn R Programming

paws.analytics (version 0.7.0)

athena: 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

athena(config = list(), credentials = list(), endpoint = NULL, region = NULL)

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.

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.

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_queryReturns 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_statementReturns 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_executionReturns 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_reservationCancels the capacity reservation with the specified name
create_capacity_reservationCreates a capacity reservation with the specified name and number of requested data processing units
create_data_catalogCreates (registers) a data catalog with the specified name and properties
create_named_queryCreates a named query in the specified workgroup
create_notebookCreates an empty ipynb file in the specified Apache Spark enabled workgroup
create_prepared_statementCreates a prepared statement for use with SQL queries in Athena
create_presigned_notebook_urlGets an authentication token and the URL at which the notebook can be accessed
create_work_groupCreates a workgroup with the specified name
delete_capacity_reservationDeletes a cancelled capacity reservation
delete_data_catalogDeletes a data catalog
delete_named_queryDeletes the named query if you have access to the workgroup in which the query was saved
delete_notebookDeletes the specified notebook
delete_prepared_statementDeletes the prepared statement with the specified name from the specified workgroup
delete_work_groupDeletes the workgroup with the specified name
export_notebookExports the specified notebook and its metadata
get_calculation_executionDescribes a previously submitted calculation execution
get_calculation_execution_codeRetrieves the unencrypted code that was executed for the calculation
get_calculation_execution_statusGets the status of a current calculation
get_capacity_assignment_configurationGets the capacity assignment configuration for a capacity reservation, if one exists
get_capacity_reservationReturns information about the capacity reservation with the specified name
get_databaseReturns a database object for the specified database and data catalog
get_data_catalogReturns the specified data catalog
get_named_queryReturns information about a single query
get_notebook_metadataRetrieves notebook metadata for the specified notebook ID
get_prepared_statementRetrieves the prepared statement with the specified name from the specified workgroup
get_query_executionReturns information about a single execution of a query if you have access to the workgroup in which the query ran
get_query_resultsStreams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3
get_query_runtime_statisticsReturns 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_sessionGets the full details of a previously created session, including the session status and configuration
get_session_statusGets the current status of a session
get_table_metadataReturns table metadata for the specified catalog, database, and table
get_work_groupReturns information about the workgroup with the specified name
import_notebookImports a single ipynb file to a Spark enabled workgroup
list_application_dpu_sizesReturns the supported DPU sizes for the supported application runtimes (for example, Athena notebook version 1)
list_calculation_executionsLists the calculations that have been submitted to a session in descending order
list_capacity_reservationsLists the capacity reservations for the current account
list_databasesLists the databases in the specified data catalog
list_data_catalogsLists the data catalogs in the current Amazon Web Services account
list_engine_versionsReturns a list of engine versions that are available to choose from, including the Auto option
list_executorsLists, in descending order, the executors that joined a session
list_named_queriesProvides a list of available query IDs only for queries saved in the specified workgroup
list_notebook_metadataDisplays the notebook files for the specified workgroup in paginated format
list_notebook_sessionsLists, 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_statementsLists the prepared statements in the specified workgroup
list_query_executionsProvides a list of available query execution IDs for the queries in the specified workgroup
list_sessionsLists the sessions in a workgroup that are in an active state like CREATING, CREATED, IDLE, or BUSY
list_table_metadataLists the metadata for the tables in the specified data catalog database
list_tags_for_resourceLists the tags associated with an Athena resource
list_work_groupsLists available workgroups for the account
put_capacity_assignment_configurationPuts a new capacity assignment configuration for a specified capacity reservation
start_calculation_executionSubmits calculations for execution within a session
start_query_executionRuns the SQL query statements contained in the Query
start_sessionCreates a session for running calculations within a workgroup
stop_calculation_executionRequests the cancellation of a calculation
stop_query_executionStops a query execution
tag_resourceAdds one or more tags to an Athena resource
terminate_sessionTerminates an active session
untag_resourceRemoves one or more tags from an Athena resource
update_capacity_reservationUpdates the number of requested data processing units for the capacity reservation with the specified name
update_data_catalogUpdates the data catalog that has the specified name
update_named_queryUpdates a NamedQuery object
update_notebookUpdates the contents of a Spark notebook
update_notebook_metadataUpdates the metadata for a notebook
update_prepared_statementUpdates a prepared statement
update_work_groupUpdates the workgroup with the specified name

Examples

Run this code
if (FALSE) {
svc <- athena()
svc$batch_get_named_query(
  Foo = 123
)
}

Run the code above in your browser using DataLab