如何在DBT项目中更改Google_ads模式?
我有一个DBT项目,我正在使用AD_Reporting模型。 除Google_ads外,所有来源都很好。 那是因为我没有Google_ads架构,而是我有Google_ads_us架构。 我尝试在MAIN DBT_PROJECT.YML文件中更改它:
vars:
google_ads_schema: google_ads_us
但是,当我运行此命令时,
dbt run --select ad_reporting
我仍然会获取此错误:
Database Error in model stg_google_ads (models\stg_google_ads.sql)
SQL compilation error:
Object 'DATABASE.HISTORY_GOOGLE_ADS.GOOGLE_ADS__URL_AD_ADAPTER' does not exist or not
authorized.
compiled SQL at target\run\ad_reporting\models\stg_google_ads.sql
history_ prefix来自profiles.yml文件(schema)。
有人知道我需要在哪里更改模式吗?
I have a dbt project and I'm using ad_reporting model.
all the sources are working good, except than google_ads.
and that's because I don't have google_ads schema, instead I have google_ads_us schema.
I tried to change it in main dbt_project.yml file:
vars:
google_ads_schema: google_ads_us
but still when I'm running this command:
dbt run --select ad_reporting
I keep get this error:
Database Error in model stg_google_ads (models\stg_google_ads.sql)
SQL compilation error:
Object 'DATABASE.HISTORY_GOOGLE_ADS.GOOGLE_ADS__URL_AD_ADAPTER' does not exist or not
authorized.
compiled SQL at target\run\ad_reporting\models\stg_google_ads.sql
the HISTORY_ prefix is from profiles.yml file (SCHEMA).
Anyone know where else I need to change the schema?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了使软件包找到已定义的指定
vars
,您需要做四件事,所有这些都在 docs :1。确保启用了Google_ads的
ad_reporting
- >2。另外,请确保您让DBT知道在哪里寻找Google_ads原始数据:
3。定义DBT将在其中构建
google_ads
和google_ads_source
- &gt的模型。由于根据文档的规定:
“默认情况下,此软件包将在标题(< target_schema> + _Stg_google_ads)和Google Ads最终模型的架构中构建Google广告登台模型,并具有标题为(< target_schema> gt; gt; + _google_ads)在您的目标数据库中。“
4。指定您要使用的API(Google AdWords或Google Ads):
For the package to find the specified
vars
it has defined, you will need to do four things, all specified in the docs:1. Make sure that
ad_reporting
for google_ads is enabled -->2. Also, make sure that you let dbt know where to look for the google_ads raw data:
3. Define the schemas where dbt will build the models for both
google_ads
andgoogle_ads_source
-->Since, as according to the docs:
"By default this package will build the Google Ads staging models within a schema titled (<target_schema> + _stg_google_ads) and the Google Ads final models with a schema titled (<target_schema> + _google_ads) in your target database."
4. Specify which API you're going to use (Google Adwords or Google Ads):