Skip to content

feat: Add AWS Athena support#548

Open
xzachx wants to merge 8 commits intobrooklyn-data:mainfrom
xzachx:feature/add-athena-support
Open

feat: Add AWS Athena support#548
xzachx wants to merge 8 commits intobrooklyn-data:mainfrom
xzachx:feature/add-athena-support

Conversation

@xzachx
Copy link
Copy Markdown

@xzachx xzachx commented Apr 11, 2026

Overview

Adds AWS Athena (via the dbt-athena adapter) as a supported data warehouse for the dbt_artifacts package. Athena is built on the Trino engine, so the implementation closely mirrors the existing Trino adapter support.

Update type - breaking / non-breaking

  • Minor bug fix
  • Documentation improvements
  • Quality of Life improvements
  • New features (non-breaking change)
  • New features (breaking change)
  • Other (non-breaking change)
  • Other (breaking change)
  • Release preparation

What does this solve?

Closes #399 and closes #439. Adds Athena support as a new data warehouse target, including Iceberg table format support — addressing both feature requests from the community.

Description

Adds AWS Athena (via the dbt-athena adapter) as a supported data warehouse for the dbt_artifacts package.

Athena is built on the Trino engine, so the implementation closely mirrors the existing Trino adapter support.

Changes

New Athena dispatch macros

  • Database helpers: athena__type_array(), athena__type_numeric(), athena__str_left(), athena__insert_into_metadata_table()
  • Upload datasets: athena__get_*_dml_sql() for all 11 datasets (invocations, models, model_executions, exposures, sources, seeds, seed_executions, tests, test_executions, snapshots, snapshot_executions)

Configuration

  • dbt_project.yml: Iceberg file_format for Athena, persist_docs exclusion
  • tox.ini: Athena integration test environment, AWS credential passenv
  • profiles.yml: Athena target profile with work_group, S3 dirs, region
  • safe_cast.sql: Athena type mappings
  • example-env.sh: Athena environment variable placeholders
  • README.md: Athena listed in supported data warehouses

Test fixture adjustments

  • incremental.sql: Cast string literals to dbt.type_string() for Athena varchar compatibility
  • Microbatch model excluded from Athena tests (requires Hive-specific partitioned_by config)

Testing

Integration tests run against real AWS Athena (engine v3):

  • Result: 48 PASS, 0 ERROR, 0 WARN
  • Tests verified: source table creation, all upload macros via on-run-end hook, staging views, mart views, schema tests
  • All writes isolated to test-namespaced Glue database and scratch S3 bucket

Outstanding questions

None at this time.

What databases have you tested with?

  • Snowflake
  • Google BigQuery
  • Databricks
  • Spark
  • AWS Athena (engine v3, via dbt-athena)
  • N/A

Checklist

  • Code follows the project's style guidelines
  • Changes are limited to Athena adapter support (no modifications to existing adapter macros)
  • Integration tests pass on Athena
  • README updated to reflect new adapter support
  • Allow maintainer edits enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Athena + Iceberg support [Feature]: Support for AWS Athena

1 participant