target-athena from meltanolabs

Serverless S3 Database

The target-athena Meltano loader pulls data from Athena that can then be sent to a destination using a loader.

Other Available Variants

  • meltanolabs (default)

Getting Started


If you haven't already, follow the initial steps of the Getting Started guide:

  1. Install Meltano
  2. Create your Meltano project

Installation and configuration

  1. Add the target-athena loader to your project using
    meltano add
  2. meltano add loader target-athena
  3. Configure the target-athena settings using
    meltano config
  4. meltano config target-athena set --interactive

Next steps

If you run into any issues, learn how to get help.


The current capabilities for
may have been automatically set when originally added to the Hub. Please review the capabilities when using this loader. If you find they are out of date, please consider updating them by making a pull request to the YAML file that defines the capabilities for this loader.

This plugin has the following capabilities:

  • about
  • stream-maps

You can override these capabilities or specify additional ones in your meltano.yml by adding the capabilities key.


The target-athena settings that are known to Meltano are documented below. To quickly find the setting you're looking for, click on any setting name from the list:

You can override these settings or specify additional ones in your meltano.yml by adding the settings key.

Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.

Athena Database (athena_database)

  • Environment variable: TARGET_ATHENA_ATHENA_DATABASE

The name of the Athena database to connect to.

AWS Region (aws_region)

  • Environment variable: TARGET_ATHENA_AWS_REGION

The AWS region to use i.e. us-east-2.

AWS S3 Access Key ID (aws_access_key_id)

  • Environment variable: TARGET_ATHENA_AWS_ACCESS_KEY_ID

S3 Access Key Id. If not provided, aws_profile or AWS_ACCESS_KEY_ID environment variable will be used.

AWS S3 Secret Access Key (aws_secret_access_key)

[No description provided.]

AWS S3 Session Token (aws_session_token)

  • Environment variable: TARGET_ATHENA_AWS_SESSION_TOKEN

Optional - S3 AWS STS token for temporary credentials. If not provided, AWS_SESSION_TOKEN environment variable will be used.

AWS profile name (aws_profile)

  • Environment variable: TARGET_ATHENA_AWS_PROFILE

Optional - AWS profile name for profile based authentication. If not provided, AWS_PROFILE environment variable will be used.

Bucket (s3_bucket)

  • Environment variable: TARGET_ATHENA_S3_BUCKET

AWS S3 bucket name

S3 Key Prefix (s3_key_prefix)

  • Environment variable: TARGET_ATHENA_S3_KEY_PREFIX

A static prefix before the generated S3 key names. Using prefixes you can upload files into specific directories in the S3 bucket. Default(None)

S3 Staging Directory (s3_staging_dir)

  • Environment variable: TARGET_ATHENA_S3_STAGING_DIR

S3 location to stage files. Example - s3://YOUR_S3_BUCKET/path/to/

Delimiter (delimiter)

  • Environment variable: TARGET_ATHENA_DELIMITER

(Default - ',') A one-character string used to separate fields.

Quote Character (quotechar)

  • Environment variable: TARGET_ATHENA_QUOTECHAR

(Default - '"') A one-character string used to quote fields containing special characters, such as the delimiter or quotechar, or which contain new-line characters.

Add Record Metadata (add_record_metadata)


(Default - False) Metadata columns add extra row level information about data ingestions, (i.e. when was the row read in source, when was inserted or deleted in snowflake etc.) Metadata columns are creating automatically by adding extra columns to the tables with a column prefix sdc. The column names are following the stitch naming conventions documented at Enabling metadata columns will flag the deleted rows by setting the _sdc_deleted_at metadata column. Without the add_record_metadata option the deleted rows from singer taps will not be recongisable in Snowflake.

Encryption Type (encryption_type)

  • Environment variable: TARGET_ATHENA_ENCRYPTION_TYPE

(Default - 'none') The type of encryption to use. Current supported options are - 'none' and 'KMS'.

Encryption Key (encryption_key)

  • Environment variable: TARGET_ATHENA_ENCRYPTION_KEY

A reference to the encryption key to use for data encryption. For KMS encryption, this should be the name of the KMS encryption key ID (e.g. '1234abcd-1234-1234-1234-1234abcd1234'). This field is ignored if 'encryption_type' is none or blank.

Compression (compression)

  • Environment variable: TARGET_ATHENA_COMPRESSION

The type of compression to apply before uploading. Supported options are none (default) and gzip. For gzipped files, the file extension will automatically be changed to .csv.gz for all files.

Naming Convention (naming_convention)


(Default - None) Custom naming convention of the s3 key. Replaces tokens date, stream, and timestamp with the appropriate values. Supports "folders" in s3 keys e.g. folder/folder2/{stream}/export_date={date}/{timestamp}.csv. Honors the s3_key_prefix, if set, by prepending the "filename". E.g. naming_convention = folder1/my_file.csv and s3_key_prefix = prefix_ results in folder1/prefix_my_file.csv

Temp Directory (temp_dir)

  • Environment variable: TARGET_ATHENA_TEMP_DIR

(Default - platform-dependent) Directory of temporary CSV files with RECORD messages.

Object Format (object_format)

  • Environment variable: TARGET_ATHENA_OBJECT_FORMAT

(Default - jsonl) The format to write the S3 in - jsonl or csv

Flattten Records (flatten_records)

  • Environment variable: TARGET_ATHENA_FLATTEN_RECORDS

Whether to flatten nested import data before loading it to Athena.

Something missing?

This page is generated from a YAML file that you can contribute changes to.

Edit it on GitHub!

Looking for help?

If you're having trouble getting the target-athena loader to work, look for an existing issue in its repository, file a new issue, or join the Meltano Slack community and ask for help in the


meltano add loader target-athena

Maintenance Status

  • Maintenance Status
  • Stars
  • Forks
  • Open Issues
  • Open PRs
  • Contributors
  • License


  • Meltano Community

Meltano Stats

  • Total Executions (Last 3 Months)
  • Projects (Last 3 Months)


  • file