Run the following command to install the connector from the root of your project:

npm install --save @latitude-data/athena-connector

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.


To configure the connection with your Athena database follow these steps:


Create the source `.yaml` file within the `queries` folder if you haven't already



Add the following code for your Athena connection

type: athena
    region: string
      accessKeyId: string
      secretAccessKey: string
  database: string
  catalog: string
  workgroup: string

Replace the details section with your info and save


Done, now you can test your connection


  • 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:

  1. Create a query .sql in the queries directory that points to a table of your new connection in the FROM clause. See the section SQL Syntax Basics to learn more.
  2. Use the command line to run latitude run query_file_name where query_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.