我的dbt项目构建没有错误,但在构建后看不到数据仓库中的视图



所以我在开发环境中构建了这个项目。我可以看到那里的所有视图,除了我刚刚创建的视图。这是正在运行的verbose:

Running with dbt=0.20.1
[WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 8 unused configuration paths:
- models.data_transformation.invitations
- models.data_transformation.benefits
- models.data_transformation.answers
- models.data_transformation.planner_interactions
- models.data_transformation.churn_zero
- models.data_transformation.net_worth
- models.data_transformation.reported_issues
- models.data_transformation.users
Found 10 models, 21 tests, 0 snapshots, 0 analyses, 358 macros, 3 operations, 0 seed files, 0 sources, 0 exposures
11:16:53 | Concurrency: 3 threads (target='dev')
11:16:53 |
11:16:53 | 1 of 10 START view model public.latest_employer_benefits_model....... [RUN]
11:16:53 | 2 of 10 START view model public.churn_zero_report.................... [RUN]
11:16:53 | 3 of 10 START view model public.latest_answers_model................. [RUN]
11:17:04 | 1 of 10 OK created view model public.latest_employer_benefits_model.. [CREATE VIEW in 10.83s]
11:17:04 | 4 of 10 START view model public.latest_goal_model.................... [RUN]
11:17:05 | 2 of 10 OK created view model public.churn_zero_report............... [CREATE VIEW in 11.78s]
11:17:05 | 5 of 10 START view model public.latest_invitation_model.............. [RUN]
11:17:06 | 3 of 10 OK created view model public.latest_answers_model............ [CREATE VIEW in 12.67s]
11:17:06 | 6 of 10 START view model public.latest_net_worth_model............... [RUN]
11:17:18 | 4 of 10 OK created view model public.latest_goal_model............... [CREATE VIEW in 13.65s]
11:17:18 | 7 of 10 START view model public.latest_planner_interactions.......... [RUN]
11:17:18 | 5 of 10 OK created view model public.latest_invitation_model......... [CREATE VIEW in 13.43s]
11:17:18 | 8 of 10 START view model public.latest_reported_issues............... [RUN]
11:17:19 | 6 of 10 OK created view model public.latest_net_worth_model.......... [CREATE VIEW in 13.37s]
11:17:19 | 9 of 10 START view model public.latest_user_model.................... [RUN]
11:17:31 | 7 of 10 OK created view model public.latest_planner_interactions..... [CREATE VIEW in 13.00s]
11:17:31 | 10 of 10 START view model public.current_employer_benefits_model..... [RUN]
11:17:31 | 8 of 10 OK created view model public.latest_reported_issues.......... [CREATE VIEW in 13.16s]
11:17:32 | 9 of 10 OK created view model public.latest_user_model............... [CREATE VIEW in 13.19s]
11:17:37 | 10 of 10 OK created view model public.current_employer_benefits_model [CREATE VIEW in 6.90s]
11:17:39 |
11:17:39 | Running 3 on-run-end hooks
11:17:39 | 1 of 3 START hook: origin_data_transformation.on-run-end.0........... [RUN]
11:17:39 | 1 of 3 OK hook: origin_data_transformation.on-run-end.0.............. [GRANT in 0.23s]
11:17:39 | 2 of 3 START hook: origin_data_transformation.on-run-end.1........... [RUN]
11:17:40 | 2 of 3 OK hook: origin_data_transformation.on-run-end.1.............. [GRANT in 0.24s]
11:17:40 | 3 of 3 START hook: origin_data_transformation.on-run-end.2........... [RUN]
11:17:40 | 3 of 3 OK hook: origin_data_transformation.on-run-end.2.............. [ALTER DEFAULT PRIVILEGES in 0.22s]
11:17:40 |
11:17:40 |
11:17:40 | Finished running 10 view models, 3 hooks in 53.26s.
Completed successfully
Done. PASS=10 WARN=0 ERROR=0 SKIP=0 TOTAL=10

最后,但同样重要的是,这是这个特定视图的schema.yml:

version: 2
models:
- name: churn_zero_report
columns:
- name: employer_churn_zero_id
tests:
- unique
- not_null

我创建的在DW中看不到的视图是churn_zero_report。在这方面找不到任何帮助。我也是dbt的新手,还在学习。

理想情况下,它应该位于您在profiles.yml下的dev-profile中定义的数据库的公共架构中。此外,检查您对该表使用了什么具体化也很重要。默认情况下,dbt将每个模型具体化为一个视图,但如果您已将其定义为一个表,则应在表下进行检查

另一件需要检查的事情是schema.yml中的模型定义,如果您用其他名称定义了模型。

最后,权限。我看到运行中的端操作运行GRANT命令。我不知道他们在做什么,但如果你可能在要授予权限的表列表中缺少那个特定的表?

最新更新