Sources
Athena
How to configure your Athena database
Install
Run the following command to install the connector from the root of your project:
How to configure sources
The sources files must be inside the queries/
folder.
To know how the source hierarchy works, please, visit How to configure sources.
Configuration
To configure the connection with your Athena database follow these steps:
1
Create the source `.yaml` file within the `queries` folder if you haven't already
/queries/source.yml
2
Add the following code for your Athena connection
3
Replace the details section with your info and save
4
Done, now you can test your connection
Attributes
- Client → The client configuration
- region (Optional) -> The AWS region where your Athena instance is located
- credentials (Optional)
- accessKeyId -> AWS Access Key
- secretAccessKey -> AWS Secret Key
- Database → The name of the Athena database where your queries will be executed. This is the container for your tables and data in Athena.
- Catalog → Identifies the data source catalog in Athena that organizes your databases and tables. It acts as a central repository for managing and accessing your diverse data sources.
- Workgroup → The logical grouping of queries under a common configuration for cost tracking and resource management. It allows you to organize queries for optimization and governance purposes. If not specified, the default workgroup is used. Remember that the workgroup must have an OutputLocation configured in order for Athena to be able to execute queries.
Test connection
To test the connection you can:
- Create a query
.sql
in thequeries
directory that points to a table of your new connection in theFROM
clause. See the section SQL Syntax Basics to learn more. - Use the command line to run
latitude run query_file_name
wherequery_file_name
is the name of your.sql
file. This will display the results in your terminal. See the section Running queries to learn more about how to query your data.