I’m trying to get an AWS Athena adapter setup with dbt-core
setup
python -m pip install dbt-core dbt-athena
- following this doc: Athena setup | dbt Developer Hub
~/.dbt/profiles.yml
default:
outputs:
dev:
type: athena
s3_staging_dir: [s3_staging_dir]
s3_data_dir: [s3_data_dir]
s3_data_naming: [table_unique] # the type of naming convention used when writing to S3
region_name: [region_name]
database: [database name]
schema: [dev_schema]
aws_profile_name: [optional profile to use from your AWS shared credentials file.]
threads: [1 or more]
num_retries: [0 or more] # number of retries performed by the adapter. Defaults to 5
target: dev
error
running dbt debug
returns the following error:
from dbt.adapters.athena.connections import AthenaConnectionManager, AthenaCredentials
File "/usr/local/Caskroom/miniconda/base/envs/ww-data-integrity-dbt/lib/python3.11/site-packages/dbt/adapters/athena/connections.py", line 15, in <module>
from dbt.adapters.base import Credentials
ImportError: cannot import name 'Credentials' from 'dbt.adapters.base' (/usr/local/Caskroom/miniconda/base/envs/ww-data-integrity-dbt/lib/python3.11/site-packages/dbt/adapters/base/__init__.py)
Visiting the dbt-athena
github repo I was able to get things working with the following install command:
python -m pip uninstall dbt-athena
python -m pip install git+https://github.com/dbt-athena/dbt-athena.git
- dbt-athena/dbt-athena: The athena adapter plugin for dbt (https://getdbt.com)