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
Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration
-
Add the target-athena loader to your project
using
:meltano add
-
Configure the target-athena settings using
:meltano config
meltano add loader target-athena
meltano config target-athena set --interactive
Next steps
Follow the remaining steps of the Getting Started guide:
If you run into any issues, learn how to get help.
Capabilities
The current capabilities fortarget-athena
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.
Settings
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:
athena_database
aws_region
aws_access_key_id
aws_secret_access_key
aws_session_token
aws_profile
s3_bucket
s3_key_prefix
s3_staging_dir
delimiter
quotechar
add_record_metadata
encryption_type
encryption_key
compression
naming_convention
temp_dir
object_format
flatten_records
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)
-
Environment variable:
TARGET_ATHENA_AWS_SECRET_ACCESS_KEY
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)
-
Environment variable:
TARGET_ATHENA_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 https://www.stitchdata.com/docs/data-structure/integration-schemas#sdc-columns. 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)
-
Environment variable:
TARGET_ATHENA_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?
#plugins-general
channel.
Install
meltano add loader target-athena
Homepage
Maintenance Status
Meltano Stats
Keywords