Skip to navigation

Supports:

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

Connection

Configuration

NameTypeDescriptionRequired
auth_modestringAuthentication method

How to authenticate with AWS. Defaults to Access Key and Secret. Accepted values: access_key_and_secret ↓, iam_role ↓
required
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
required
regionstringAWS regionrequired

auth_mode

When auth_mode is access_key_and_secret:

NameTypeDescriptionRequired
access_idstringAWS access IDoptional
secret_access_keystringAWS secret access keyoptional
Read-only propertyTypeDescription
aws_userstringUser ARN
{
"name": "AWS Athena connection",
"type": "awsathena",
"configuration": {
"access_id": "AKIAIOSFODNN7EXAMPLE",
"auth_mode": "access_key_and_secret",
"outputbucket": "s3://polytomic-athena-results/customer-dataset",
"region": "us-east-1",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}

When auth_mode is iam_role:

NameTypeDescriptionRequired
external_idstringExternal ID for the IAM roleoptional
iam_role_arnstringIAM role ARNrequired
tagsobjectTags

Additional tags to apply during role assumption
optional
{
"name": "AWS Athena connection",
"type": "awsathena",
"configuration": {
"auth_mode": "iam_role",
"external_id": "",
"iam_role_arn": "",
"outputbucket": "s3://polytomic-athena-results/customer-dataset",
"region": "us-east-1",
"tags": {}
}
}

Model Sync

Source

Configuration

NameTypeDescriptionRequired
catalogstringCatalogoptional
databasestringDatabaseoptional
querystringoptional
tablestringTableoptional

Example

{
...
"configuration": {
"catalog": "awsdatacatalog",
"database": "default",
"query": "SELECT * FROM \"webdata\".\"impressions\"",
"table": "users"
}
}

Target

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

All targets

Configuration
NameTypeDescriptionRequired
created_columnstring’Created at’ timestamp columnoptional
preserve_table_on_resyncbooleanPreserve destination table when resyncingoptional
updated_columnstring’Updated at’ timestamp columnoptional
write_record_timestampsbooleanWrite row timestamp metadataoptional
Example
{
...
"target": {
"configuration": {
"created_column": "",
"preserve_table_on_resync": false,
"updated_column": "",
"write_record_timestamps": false
}
}
}

Target creation

AWS Athena connections may be used to create a new target for a model sync. The following parameters are required to create a new target:

NAMEDESCRIPTIONENUM
nameTable namefalse

Bulk Sync

Source

AWS Athena connections may be used as a bulk sync source. No additional configuration options are required.

Destination

Configuration

NameTypeDescriptionRequired
advancedobjectoptional
mirror_schemasbooleanIndicates whether schemas should be mirroredoptional
schemastringOutput schema to write tooptional

Example

{
...
"destination_configuration": {
"advanced": {
"table_prefix": "",
"truncate_existing": false
},
"mirror_schemas": false,
"schema": "public"
}
}

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