在 DBT 中使用来自不同位置和不同项目的数据集

发布于 2025-01-15 02:20:41 字数 779 浏览 4 评论 0原文

我确实知道您可以在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

中没有任何内容(props 也不是 配置)

那么,如何您是否使用与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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如歌彻婉言 2025-01-22 02:20:41

DBT 文档 声明 DBT 将使用默认位置,除非您指定自定义项目/数据库配置。

my-profile:
 target: dev
 outputs:
   dev:
     type: bigquery
     method: oauth
     project: abc-123
     dataset: my_dataset

此外,在 .yaml 位置中,建议使用 多区域位置。

The documentation of DBT states that DBT will use the default location unless you specify a custom project/database config.

my-profile:
 target: dev
 outputs:
   dev:
     type: bigquery
     method: oauth
     project: abc-123
     dataset: my_dataset

Additionally, in the .yaml location, it is recommended to use multi-region locations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文