【发布时间】:2020-12-08 22:38:51
【问题描述】:
我正在尝试设置一个简单的 DBT 管道,该管道使用存储在 Azure Data Lake Storage 上的 parquet 表并创建另一个也将存储在同一位置的表。
在我的models/(定义为我的源路径)下,我有两个文件datalake.yml 和orders.sql。 datalake.yml 看起来像这样:
version:2
sources:
- name: datalake
tables:
- name: customers
external:
location: path/to/storage1 # I got this by from file properties in Azure
file_format: parquet
columns:
- name: id
data_type: int
description: "ID"
- name: ...
我的orders.sql 表如下所示:
{{config(materialized='table', file_format='parquet', location_root='path/to/storage2')}}
select name, age from {{ source('datalake', 'customers') }}
我也在使用dbt-external-tables 包。另请注意,当我运行 dbt debug 时,一切都很好,我可以连接到我的数据库(恰好是 Databricks)。
我尝试运行dbt run-operation stage_external_sources,它返回Error: staging external sources is not implemented for the default adapter。当我运行dbt run 时,我得到Error: UnresolvedRelation datalake.customers。
或者也许我可以以某种方式使用 hive 元存储?任何有关如何解决此问题的提示将不胜感激!
【问题讨论】:
标签: apache-spark hive parquet dbt