Overview
Execute any SQL query against Amazon Athena. Perfect for creating multi-step SQL jobs, executing DML statements, or running scheduled queries.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
Database |
ATHENA_DATABASE |
Alphanumeric |
✅ |
None |
- |
The name of the Athena database the run the query against. |
|
Query |
ATHENA_QUERY |
Alphanumeric |
✅ |
None |
- |
The SQL-style query to run against the Athena database. |
|
S3 Log Bucket Name |
ATHENA_BUCKET_NAME |
Alphanumeric |
✅ |
None |
- |
The S3 bucket to output the query logs into. |
|
S3 Log Folder Name |
ATHENA_LOG_FOLDER |
Alphanumeric |
➖ |
None |
- |
The optional subdirectory within the S3 bucket to store query logs. |
|
Access Key ID |
AWS_ACCESS_KEY_ID |
Password |
✅ |
None |
- |
The access key ID for programmatic IAM user used to download the file. See Authorization documentation for more information. |
|
Secret Access Key |
AWS_SECRET_ACCESS_KEY |
Password |
✅ |
None |
- |
The secret access key for programmatic IAM user used to download the file. See Authorization documentation for more information. |
|
Region |
AWS_DEFAULT_REGION |
Select |
✅ |
us-east-2 |
us-east-2
|
The AWS region for the S3 bucket and IAM user. |
YAML
Below is the YAML template
source:
template: Amazon Athena - Execute Query
inputs:
ATHENA_DATABASE:
ATHENA_QUERY:
ATHENA_BUCKET_NAME:
ATHENA_LOG_FOLDER:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_DEFAULT_REGION: us-east-2
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 101
- 102
- 103
- 104
- 105
- 106
- 200
- 249