Athena
Athena operations run SQL and read catalog metadata. They do not use tableArn.
[defaults]can setregion,workgroupandoutputLocationfor all Athena operations in the request.- To query Athena outside a request, see Query Athena.
Athena query [[athena.query]]
Runs an Athena SQL query. By default, it waits for the query and returns its rows. Destructive
[defaults]
profileName = "analytics"
region = "ap-southeast-2"
workgroup = "dynomate"
outputLocation = "s3://example-athena-results/dynomate/"
[[athena.query]]
name = "Paid orders"
database = "commerce"
maxRows = 500
sql = """
SELECT order_id, total, order_date
FROM orders
WHERE status = ?
AND total >= ?
AND order_date >= ?
"""
executionParameters = ["'PAID'", "100", "CAST('2026-09-01' AS DATE)"] - Every Athena query is destructive.
- Dynomate resolves
${...}expressions in the SQL, but does not quote values. - In
executionParameters, write numbers as they are, for example"100". Use SQLCASTfor dates. - A
?in quotes is not a placeholder. - The operation has a ten-minute timeout by default.
- With
waitForCompletion = false, the result has no rows, and the app shows the status Submitted. - A failed or canceled query fails the operation with the reason from Athena.
- Without
clientRequestToken, Dynomate can stop the query when you cancel the run or it times out. See Athena query ownership. - The result has
queryExecutionId,state,statementType,columns,rows,rowCountandtruncated. It also hasbytesScanned,executionTimeMs,elapsedMs,outputLocation,updateCountandrequestId. - Each row maps column names to strings or
null. Dynomate adds_2,_3and so on to duplicate column names.
Keys
- sql string Required
- The SQL statement that Athena runs. Dynomate sends it as written and does not change it or add a limit. In the app: SQL tab › SQL
- catalog string
- The data catalog for the query. The default is "AwsDataCatalog". In the app: Operation header › Catalog
- database string
- The default database for table names without a database. In the app: Operation header › Database
- workgroup string
- The Athena workgroup. If you omit it, Dynomate uses the request default, then the primary workgroup. In the app: Operation header › Workgroup
- outputLocation string
- The S3 location for results, for example s3://bucket/prefix. If you omit it, Dynomate uses the request default. If there is no default, Athena uses the workgroup setting. In the app: Output tab › Result output location
- executionParameters string[]
- The values for the ? placeholders, from left to right. Each value is SQL text, so put text values in single quotes, for example "'PAID'". In the app: SQL tab › Execution parameters
- clientRequestToken string
- An idempotency token for the query. In the app: Execution tab › Client request token
- maxRows integer
- The maximum number of rows in the result, not a limit on scanned data or cost. The default is 1,000, and 0 returns all rows. In the app: Output tab › Rows to retrieve
- waitForCompletion boolean
- By default, the operation waits for the query and returns its rows. If false, it finishes when Dynomate submits the query. In the app: Execution tab › Wait for completion
- pollIntervalMs integer
- The time between status checks when the operation waits, in milliseconds. The default is 1,000. In the app: Execution tab › Poll interval (ms)
List databases [[athena.listDatabases]]
Lists the databases in an Athena data catalog.
[[athena.listDatabases]]
name = "Databases"
region = "ap-southeast-2"
The result has databases, count and requestId. Each database has name and description.
Keys
List Athena tables [[athena.listTables]]
Lists the tables in an Athena database, with their columns and partition keys.
[[athena.listTables]]
name = "Commerce tables"
region = "ap-southeast-2"
database = "commerce" - The result has
tables,countandrequestId. - Each table has
name,tableType,columnsandpartitionKeys. Each column hasname,typeandcomment. Each partition key hasnameandtype.
Keys
- catalog string
- The data catalog that holds the database. The default is "AwsDataCatalog". In the app: Operation header › Catalog
- database string Required
- The database to list tables from. In the app: Operation header › Database
- expression string
- Lists only the tables with names that match this pattern. In the app: Filter tab › Table name pattern
- workgroup string
- The Athena workgroup to use. In the app: Operation header › Workgroup
Describe Athena table [[athena.describeTable]]
Returns the columns, partition keys and properties of one Athena table.
[[athena.describeTable]]
name = "Orders columns"
region = "ap-southeast-2"
database = "commerce"
tableName = "orders"
The result has table and requestId. table has name, tableType, columns, partitionKeys, parameters, createTime and lastAccessTime.
Keys
- catalog string
- The data catalog that holds the database. The default is "AwsDataCatalog". In the app: Operation header › Catalog
- database string Required
- The database that contains the table. In the app: Operation header › Database
- tableName string Required
- The name of the Athena table to describe. In the app: Operation header › Table
- workgroup string
- The Athena workgroup to use. In the app: Operation header › Workgroup