Overview
Turn the results of your SQL SELECT statement into a CSV file. Extract your Amazon Athena data into files for easier delivery to clients and partners.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
Database |
ATHENA_DATABASE |
Alphanumeric |
✅ |
- |
- |
The name of the Athena database the run the query against. |
|
Query |
ATHENA_QUERY |
Alphanumeric |
✅ |
- |
- |
The SQL-style query to run against the Athena database. |
|
S3 Log Bucket Name |
ATHENA_BUCKET_NAME |
Alphanumeric |
✅ |
- |
- |
The S3 bucket to output the query logs into. |
|
S3 Log Folder Name |
ATHENA_LOG_FOLDER |
Alphanumeric |
➖ |
- |
- |
The optional subdirectory within the S3 bucket to store query logs. |
|
Shipyard File Name |
ATHENA_DESTINATION_FILE_NAME |
Alphanumeric |
✅ |
|
- |
The file name that you want your generated CSV to have. |
|
Shipyard Folder Name |
ATHENA_DESTINATION_FOLDER_NAME |
Alphanumeric |
➖ |
- |
- |
The folder structure that you want your CSV to be created in. If left blank, the file will be created in the home directory. |
|
Access Key ID |
AWS_ACCESS_KEY_ID |
Password |
✅ |
- |
- |
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 |
✅ |
- |
- |
The secret access key for programmatic IAM user used to download the file. See Authorization documentation for more information. |
|
Region |
AWS_DEFAULT_REGION |
Select |
✅ |
|
|
The AWS region for the S3 bucket and IAM user. |
YAML
Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.
source:
blueprint: Amazon Athena - Download Query Results to Shipyard
inputs:
ATHENA_DATABASE: null ## REQUIRED
ATHENA_QUERY: null ## REQUIRED
ATHENA_BUCKET_NAME: null ## REQUIRED
ATHENA_LOG_FOLDER: null
ATHENA_DESTINATION_FILE_NAME: output.csv ## REQUIRED
ATHENA_DESTINATION_FOLDER_NAME: null
AWS_ACCESS_KEY_ID: null ## REQUIRED
AWS_SECRET_ACCESS_KEY: null ## REQUIRED
AWS_DEFAULT_REGION: us-east-2 ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '101'
- '102'
- '103'
- '104'
- '105'
- '106'
- '200'
- '249'