Athena Query Executer

The Athena Query Executer component allows you to run SQL queries directly on external tables created in Amazon Athena. Amazon Athena is an interactive query service that enables analysis of data stored in Amazon S3 using standard SQL.

With this component, users can connect to Athena, execute queries against defined databases and tables, and retrieve results for downstream processing in the pipeline.

Configuration Sections

The Athena Query Executer configurations are organized into the following sections:

  • Basic Information

  • Meta Information

  • Resource Configuration

  • Connection Validation

Meta Information Tab

Parameter
Description
Example

Region

AWS region where the S3 bucket is located.

us-east-1

Access Key

AWS Access Key for the account.

AKIA…

Secret Key

AWS Secret Key for the account.

********

Database Name

Name of the Athena database containing the table.

analytics_db

Table Name

Name of the external table in Athena.

employee

Data Source

Data source name configured in Athena (points to S3).

AwsDataCatalog

Workgroup

Athena workgroup name. Segregates query execution and history.

primary

Query Location

Path where Athena query results are stored in S3.

s3://my-query-results/

Limit

Maximum number of records to retrieve.

1000

Query

Spark SQL query to execute on Athena.

SELECT * FROM employee LIMIT 10;

Example Queries

1. Select Data

2. Insert Data

3. Create Table Using CTAS

4. Using Common Table Expressions (CTEs)

Notes

  • Ensure your IAM user or role has the required permissions for Athena and S3.

  • The Query Location path must exist in S3 and be configured in the Athena console.

  • Use Workgroups to isolate query history and enforce cost or resource limits across teams.

  • For large datasets, set a Limit or apply filters to reduce execution costs.