'My dbt project builds without error, but can't see the view at the datawarehouse after building
So I've built the project in dev environment. I can see all views there, minus the one I've just created. This is the running 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
Last, but not least, this is the schema.yml for this specific view:
version: 2
models:
- name: churn_zero_report
columns:
- name: employer_churn_zero_id
tests:
- unique
- not_null
The view I created that I can't see in the DW is the churn_zero_report. Couldn't find any help on this. I am also new to dbt, still learning.
Solution 1:[1]
ideally it should be located in the public schema of the database you defined in dev profile under profiles.yml. Also, it is important to check what materialization you used for that table. By default dbt materializes every model as a view but if you've defined that as a table then you should check under tables
another thing to check is the model definitions in schema.yml if you've defined the model by some other name.
Finally, the permissions. I see the on-run-end operations running GRANT commands. I don't know what they're doing but if it's like you might be missing that particular table in list of tables to be granted permissions?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | gurjarprateek |
