Skip to content

Athena Iceberg schema ​

Pair this with the Athena Iceberg destination. The destination writes Iceberg data; this sink keeps the Glue catalog entry aligned. Use the same warehouse, database, and workgroup on both.

Before you begin ​

  • The Athena Iceberg destination already in skippr.yml.
  • Glue rights to create and update Iceberg tables.

Configure ​

python
from skippr import Config, DataSinkAthenaIceberg, Pipeline

cfg = Config.discover()
lake = cfg.data_sink(
    "lake",
    DataSinkAthenaIceberg(
        warehouse="s3://my-iceberg-warehouse/",
        glue_database_name="analytics",
        athena_workgroup_name="primary",
        athena_results_s3_bucket="my-athena-results",
        region="us-east-1",
    ),
    schema_sink="lake_schema",
)
cfg.pipeline("reports", Pipeline(data_source=cfg.get_data_source("sample"), data_sink=lake))
cfg.save()
bash
skipprd connect data-sink athenaiceberg \
  --pipeline reports \
  --name lake \
  --warehouse s3://my-iceberg-warehouse/ \
  --glue-database-name analytics \
  --athena-workgroup-name primary \
  --athena-results-s3-bucket my-athena-results \
  --region us-east-1

skipprd connect schema-sink athenaiceberg \
  --pipeline reports \
  --name lake_schema
yaml
schema_sinks:
  lake_schema:
    AthenaIceberg:
      warehouse: s3://my-iceberg-warehouse/
      glue_database_name: analytics
      athena_workgroup_name: primary
      athena_results_s3_bucket: my-athena-results
      region: us-east-1

data_sinks:
  lake:
    AthenaIceberg:
      warehouse: s3://my-iceberg-warehouse/
      glue_database_name: analytics
      athena_workgroup_name: primary
      athena_results_s3_bucket: my-athena-results
    schema_sink: schema_sinks.lake_schema

Options ​

Same keys as the Athena Iceberg destination.

KeyTypeRequired/DefaultDescription
warehouseURIRequiredIceberg warehouse root
glue_database_namestringRequiredGlue database
athena_workgroup_namestringRequiredAthena workgroup
athena_results_s3_bucketstringRequiredResults bucket name
regionstringNot setAWS region
catalog_idstringNot setGlue catalog id
object_storeobjectNot setFile-store override

Troubleshooting ​

SymptomFix
Catalog and data disagreeCopy the destination block into schema_sinks — the fields must match
Iceberg permission errorsGrant Iceberg table APIs, not only Hive CreateTable

Next steps ​