start_query_execution: Start Query Execution

Description Usage Arguments References Examples

Description

Runs (executes) the SQL query statements contained in the query string.

Usage

1
2
3
4
start_query_execution(query, database, output_location,
  client_request_token = uuid::UUIDgenerate(), encryption_option = NULL,
  kms_key = NULL, aws_access_key_id = NULL, aws_secret_access_key = NULL,
  aws_session_token = NULL, region_name = NULL, profile_name = NULL)

Arguments

query

SQL query statements to be executed

database

database within which the query executes.

output_location

location in S3 where query results are stored.

client_request_token

unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the query , an error is returned. This is auto-generated-for-you.

encryption_option

indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or client-side encryption with KMS-managed keys (CSE-KMS) is used. Default is NULL (no encryption)

kms_key

For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. Default is NULL (no encryption)

aws_access_key_id

AWS access key id

aws_secret_access_key

AWS secret access key

aws_session_token

AWS session token

region_name

region name

profile_name

profile name

References

https://boto3.readthedocs.io/en/latest/reference/services/athena.html#Athena.Client.start_query_execution

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
start_query_execution(
  query = "SELECT * FROM elb_logs LIMIT 100",
  database = "sampledb",
  output_location = "s3://aws-athena-query-results-redacted",
  profile = "personal"
) -> sqe

## End(Not run)

hrbrmstr/roto.athena documentation built on May 29, 2019, 11:42 a.m.