【发布时间】:2022-10-22 17:26:33
【问题描述】:
我使用我的 Macbook Pro 针对 Databricks 开发 DBT 模型。一切都运行良好,但我不能独自离开,最近运行“dbt update”,发现一堆东西已经过时了。过去我遇到过升级我的 Python(通过 Brew 安装)的问题,所以我避免升级 Python,而是升级了 SQLite。显然,升级 Python 是一个依赖项并且升级了 Python。因此,DBT 不再有效。
经过大量搜索,我跑了
brew remove dbt
brew install dbt
因为brew install dbt 告诉我安装 dbt-labs/dbt/dbt 已被弃用,我转而运行brew install dbt-postgre 计算我将以这种方式安装核心 DBT 文件。
然后根据https://github.com/databricks/dbt-databricks,我跑了
pip install dbt-databricks
除了关于“distutils 配置文件已弃用”的标准警告之外,一切似乎都很好,等等......
现在,我运行dbt debug,我得到了
Running with dbt=1.2.2
dbt version: 1.2.2
python version: 3.9.14
python path: /opt/homebrew/Cellar/dbt-postgres/1.2.2/libexec/bin/python
os info: macOS-12.6-arm64-arm-64bit
Using profiles.yml file at /Users/andrewpark/.dbt/profiles.yml
Using dbt_project.yml file at /Users/andrewpark/iCloud Drive (Archive)/Documents/Work >Projects/Github Source/data-platform/transformation/databricks-dbt/dbt_project.yml
18:24:13 target not specified in profile 'databricks_sql', using 'default'
18:24:13 Error importing adapter: No module named 'dbt.adapters.databricks'
Configuration:
profiles.yml file [ERROR invalid]
dbt_project.yml file [OK found and valid]
Required dependencies:
- git [OK found]
1 check failed:
Profile loading failed for the following reason:
Runtime Error
Credentials in profile "databricks_sql", target "default" invalid: Runtime Error
Could not find adapter type databricks!
我根本没有碰过我的profiles.yml 文件,所以没有任何改变,但它说该文件无效。在我看来,dbt-databricks找不到适配器。我该如何解决这个问题?
操作系统:MacOS 蒙特雷 12.6
Python版本:3.10.7
DBT 版本(核心):1.2.2
另外,我已经安装了 dbt-snowflake 和 dbt-postgres 适配器以及 dbt-databricks,但是当我运行 dbt --version 时,这些适配器没有出现,只有 Postgres 1.2.2 插件。
【问题讨论】:
标签: python macos homebrew databricks dbt