Run SQL queries on data in Amazon S3 using AWS Athena
Integrate AWS Athena into workflows. Execute SQL queries against data in S3, check query status, retrieve results, manage named queries, and list executions. Requires AWS access key and secret access key.
Start an SQL query execution in AWS Athena
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
queryString | string | はい | SQL query string to execute |
database | string | いいえ | Database name within the catalog |
catalog | string | いいえ | Data catalog name (default: AwsDataCatalog) |
outputLocation | string | いいえ | S3 output location for query results (e.g., s3://bucket/path/) |
workGroup | string | いいえ | Workgroup to execute the query in (default: primary) |
| パラメータ | 型 | 説明 |
|---|
queryExecutionId | string | Unique ID of the started query execution |
Get the status and details of an Athena query execution
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
queryExecutionId | string | はい | Query execution ID to check |
| パラメータ | 型 | 説明 |
|---|
queryExecutionId | string | Query execution ID |
query | string | SQL query string |
state | string | Query state (QUEUED, RUNNING, SUCCEEDED, FAILED, CANCELLED) |
stateChangeReason | string | Reason for state change (e.g., error message) |
statementType | string | Statement type (DDL, DML, UTILITY) |
database | string | Database name |
catalog | string | Data catalog name |
workGroup | string | Workgroup name |
submissionDateTime | number | Query submission time (Unix epoch ms) |
completionDateTime | number | Query completion time (Unix epoch ms) |
dataScannedInBytes | number | Amount of data scanned in bytes |
engineExecutionTimeInMillis | number | Engine execution time in milliseconds |
queryPlanningTimeInMillis | number | Query planning time in milliseconds |
queryQueueTimeInMillis | number | Time the query spent in queue in milliseconds |
totalExecutionTimeInMillis | number | Total execution time in milliseconds |
outputLocation | string | S3 location of query results |
Retrieve the results of a completed Athena query execution
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
queryExecutionId | string | はい | Query execution ID to get results for |
maxResults | number | いいえ | Maximum number of rows to return (1-999) |
nextToken | string | いいえ | Pagination token from a previous request |
| パラメータ | 型 | 説明 |
|---|
columns | array | Column metadata (name and type) |
rows | array | Result rows as key-value objects |
nextToken | string | Pagination token for next page of results |
updateCount | number | Number of rows affected (for INSERT/UPDATE statements) |
Stop a running Athena query execution
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
queryExecutionId | string | はい | Query execution ID to stop |
| パラメータ | 型 | 説明 |
|---|
success | boolean | Whether the query was successfully stopped |
List recent Athena query execution IDs
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
workGroup | string | いいえ | Workgroup to list executions for (default: primary) |
maxResults | number | いいえ | Maximum number of results (0-50) |
nextToken | string | いいえ | Pagination token from a previous request |
| パラメータ | 型 | 説明 |
|---|
queryExecutionIds | array | List of query execution IDs |
nextToken | string | Pagination token for next page |
Create a saved/named query in AWS Athena
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
name | string | はい | Name for the saved query |
database | string | はい | Database the query runs against |
queryString | string | はい | SQL query string to save |
description | string | いいえ | Description of the named query |
workGroup | string | いいえ | Workgroup to create the named query in |
| パラメータ | 型 | 説明 |
|---|
namedQueryId | string | ID of the created named query |
Get details of a saved/named query in AWS Athena
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
namedQueryId | string | はい | Named query ID to retrieve |
| パラメータ | 型 | 説明 |
|---|
namedQueryId | string | Named query ID |
name | string | Name of the saved query |
description | string | Query description |
database | string | Database the query runs against |
queryString | string | SQL query string |
workGroup | string | Workgroup name |
List saved/named query IDs in AWS Athena
| パラメータ | 型 | 必須 | 説明 |
|---|
awsRegion | string | はい | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | はい | AWS access key ID |
awsSecretAccessKey | string | はい | AWS secret access key |
workGroup | string | いいえ | Workgroup to list named queries for |
maxResults | number | いいえ | Maximum number of results (0-50) |
nextToken | string | いいえ | Pagination token from a previous request |
| パラメータ | 型 | 説明 |
|---|
namedQueryIds | array | List of named query IDs |
nextToken | string | Pagination token for next page |