AWS Athena

Supports:

  • ✅ Models
  • ✅ Model sync destination
  • ✅ Bulk sync source
  • ✅ Bulk sync destination

Connection

Configuration

NameTypeDescriptionRequired
access_idstringAWS Access ID

(required if auth_mode is “aws_access_key_and_secret”)
false
auth_modestringAuthentication Method

How to authenticate with AWS. Defaults to Access Key and Secret. Accepted values: access_key_and_secret, iam_role
true
external_idstringExternal ID for the IAM rolefalse
iam_role_arnstringIAM Role ARN

(required if auth_mode is “iam_role”)
false
outputbucketstringAWS S3 output bucket

A pre-existing bucket (folder optional) that AWS can use to store query results. ex: s3://polytomic-athena-results/customer-dataset
true
regionstringAWS regiontrue
secret_access_keystringAWS Secret Access Key

(required if auth_mode is “aws_access_key_and_secret”)
false
tagsobjectTags

Additional tags to apply during role assumption
false

Example

1{
2 "name": "AWS Athena connection",
3 "type": "awsathena",
4 "configuration": {
5 "access_id": "AKIAIOSFODNN7EXAMPLE",
6 "auth_mode": "access_key_and_secret",
7 "external_id": "",
8 "iam_role_arn": "",
9 "outputbucket": "s3://polytomic-athena-results/customer-dataset",
10 "region": "us-east-1",
11 "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
12 "tags": {}
13 }
14}

Read-only properties

NameTypeDescriptionRequired
aws_userstringUser ARNfalse

Model Sync

Source

Configuration

NameTypeDescriptionRequired
catalogstringCatalogfalse
databasestringDatabasefalse
querystringfalse
tablestringTablefalse

Example

1{
2 ...
3 "configuration": {
4 "catalog": "awsdatacatalog",
5 "database": "default",
6 "query": "SELECT * FROM \"webdata\".\"impressions\"",
7 "table": "users"
8 }
9}

Target

AWS Athena connections may be used as the destination in a model sync.

All targets

Configuration
NameTypeDescriptionRequired
created_columnstring’Created at’ timestamp columnfalse
preserve_table_on_resyncbooleanPreserve destination table when resyncingfalse
updated_columnstring’Updated at’ timestamp columnfalse
write_record_timestampsbooleanWrite row timestamp metadatafalse
Example
1{
2 ...
3 "target": {
4 "configuration": {
5 "created_column": "",
6 "preserve_table_on_resync": false,
7 "updated_column": "",
8 "write_record_timestamps": false
9 }
10 }
11}

Bulk Sync

Destination

Configuration

NameTypeDescriptionRequired
advancedobjectfalse
mirror_schemasbooleanIndicates whether schemas should be mirroredfalse
schemastringOutput schema to write tofalse

Example

1{
2 ...
3 "destination_configuration": {
4 "advanced": {
5 "table_prefix": "",
6 "truncate_existing": false
7 },
8 "mirror_schemas": false,
9 "schema": "public"
10 }
11}

Type handling

Destination types

POLYTOMIC TYPEAWS ATHENA TYPE
array<>string
bigintstring
booleanboolean
datetimestamp
datetimetimestamp
decimal(precision, scale)string
doublestring
intstring
jsonstring
jsonarraystring
numberstring
object{}string
singlestring
smallintstring
stringstring
timetimestamp

Source types

AWS ATHENA TYPEPOLYTOMIC TYPE
ARRAYjsonarray
BIGINTbigint
BINARYstring
CHARstring
DATEdate
DECIMALnumber
DECIMAL(precision, scale)decimal(precision, scale)
DOUBLEnumber
FLOATnumber
INTint
INTEGERint
INTERVAL DAY TO SECONDstring
INTERVAL YEAR TO MONTHstring
IPADDRESSstring
JSONjson
MAPjson
REALnumber
SMALLINTsmallint
STRINGstring
TIMEtime
TIME WITH TIME ZONEtime
TIMESTAMPdatetime
TIMESTAMP WITH TIME ZONEdatetime
TINYINTsmallint
VARBINARYstring
VARCHARstring