Athena Select
Overview
You can use this Snap to retrieve data from Amazon Athena by executing SQL queries on the specified data stored in Amazon S3. The Snap supports executing SELECT statements and fetching results based on provided filters and conditions.

Read-type Snap
Works in Ultra Tasks
Prerequisites
None.
Known issues
- ARRAY, STRUCT, and MAP data types are not supported in SELECT queries. If used, it may result in incorrect values in the output documents.
- This Snap can fail with a connection error if the account is configured with an IAM role, and, Role ARN.
- This Snap uses the Athena JDBC driver to retrieve data. When using a Cross-account IAM role, the JDBC connection expires based on the role's duration. Large datasets requiring more time than this duration are not supported.
- CSE_KMS encryption is not supported because of an issue in the Athena JDBC driver.
Workaround: Use the Athena Query Snap with a SELECT query.
- The second output view of the Snap cannot connect directly to the second input view of Athena Bulk Load Snap because Athena does not provide complete table metadata for all data types.
- This Snap can fail on a table created with ORC files in LZO compression because of an Athena service defect.
- This Snap displays an incorrect value of
1970-01-01T00:00:00Z
for thelastAccessTime
field in the table metadata returned for the second output view. This value does not reflect the actual last access time of the table.
Limitations
- This Snap does not support time travel features. If used, the Snap can produce incorrect
output values or errors. For example, appending
$snapshots
to the Table property can result in a Table not found error when the second output view is enabled.Workaround: Use the Athena Query Snap for time travel queries.
Snap views
View | Description | Examples of upstream and downstream Snaps |
---|---|---|
Input | This Snap has one document input view. | |
Output | This Snap has two document output views:
Below is an example of Athena table metadata:
|
|
Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap settings
- Expression icon (
): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
Field / Field set | Type | Description |
---|---|---|
Label | String | Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Athena Select Example: Athena Select data |
Database | String/Expression/ Suggestion | Required. Specify the name of Athena database, that is a logical grouping of Athena tables. Default value: N/A Example: mydatabase |
Table | String/Expression/ Suggestion | Required. Specify the name of the table in the Athena
database from which to retrieve data using the SELECT query. Additionally, the
Snap supports retrieving data from Iceberg tables and views. Important: Athena Select Snap does not support time travel features. If used, the Snap can
produce incorrect output values or errors. For example, appending
$snapshots to the Table property can
result in a Table not found error when the second output view is enabled.
Workaround: Use the Athena Query Snap for time travel queries. Default value: N/A Example: Sales_db |
Iceberg table metadata | Dropdown list | Choose one of the following options to query the Iceberg table metadata:
Default value: None Example: $refsNote:
When you select any of the above options other than None, the Snap displays the content of the associated metadata table at the first output view and does not retrieve the content of the Iceberg data table. If you need to retrieve the content of the data table, choose None. When you
choose None, the following fields are displayed:
![]() |
Output fields | Appears when you select None for the Iceberg table metadata. Use this field set to define the column names in the SELECT query.Tip: You can leave this field set empty to select all
columns in the table. |
|
Column | String/Expression/ Suggestion | Appears when you select None for the Iceberg table metadata. Specify the name of the column to include in the query result. Default value: N/A Example: employeeid |
Where clause | String/Expression/ Suggestion | Appears when you select None for the Iceberg table metadata. Specify the SQL WHERE clause to filter the records returned by the query. Default value: N/A Example: salary > 50000 |
Group by |
Appears when you select None for the Iceberg table metadata. Use this field set to define the GROUP BY clause. |
|
Column | String/Expression/ Suggestion | Appears when you select None for the Iceberg table metadata. Specify the column name for the GROUP BY clause. Default value: N/A Example: Column1 |
Order by | Use this field set to define the ORDER BY clause. | |
Column | String/Expression/ Suggestion | Appears when you select None for the Iceberg table metadata. Specify the list of columns for ORDER BY clause. Default value: N/A Example: Column2 |
Limit offset | Integer/Expression | Appears when you select None for the Iceberg table metadata. Specify the number of rows to skip before starting to return rows in the query result. Default value: N/A Example: 1000 |
Limit rows | Integer/Expression |
Specify the maximum number of rows to return from the query result. Default value: N/A Example: 100 |
Additional connection parameters | Appears when you select None for the Iceberg table metadata. Use this field set to define the connection parameters in addition to the ones provided in Amazon Athena Account. |
|
Parameter name | String/Expression |
Appears when you select None for the Iceberg table metadata. Specify the name of the parameter. Default value: N/A Example: Region |
Value | String/Expression |
Appears when you select None for the Iceberg table metadata. Specify the value of the parameter. Default value: N/A Example: us-west-2 |
Client settings | Use this field set to define the client settings. | |
Maximum retries | Integer/Expression |
Required. Specify the maximum number of retry
attempts. Default value: 3 Example: 100 |
Fetch size | Integer/Expression | Required. Specify the number of rows to fetch per batch
when retrieving the query result. Tip: Higher value can improve
performance but may use more memory. Default value: 10000 Example: 50000 |
Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Validate & Execute Default value: Execute |