在 DBT 中使用来自不同位置和不同项目的数据集
我确实知道您可以在profiles.yaml中配置默认的所需位置,
default:
target: default
outputs:
default:
type: bigquery
method: oauth
dataset: default_dataset
location: europe-west1
但是所有其余定义的源(在我的例子中是Bigquery数据集)将具有相同的位置。因此,我无法在该项目中查询位于 europe-east2
的数据集。文档
version: 2
sources:
- name: dataset_in_asia_location
tables:
- name: incremental_table
那么,如何您是否使用与profiles.yaml中定义的默认位置不同的位置的dbt源?
I do know you can configure your default desired location in the profiles.yaml
default:
target: default
outputs:
default:
type: bigquery
method: oauth
dataset: default_dataset
location: europe-west1
But then all the rest of the defined sources (Bigquery Datasets in my case) will have this same location. So I could not query a dataset located in europe-east2
anymore in this project
version: 2
sources:
- name: dataset_in_asia_location
tables:
- name: incremental_table
There's nothing in the documentation for the sources (props nor configs)
So, how do you use a dbt source from a diferent location that the default one defined in the profiles.yaml?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DBT 文档 声明 DBT 将使用默认位置,除非您指定自定义项目/数据库配置。
此外,在
.yaml
位置中,建议使用 多区域位置。The documentation of DBT states that DBT will use the default location unless you specify a custom project/database config.
Additionally, in the
.yaml
location, it is recommended to use multi-region locations.