Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show on-run-start/end + hooks in dbt output #696

Closed
drewbanin opened this issue Mar 14, 2018 · 3 comments · Fixed by #1440
Closed

show on-run-start/end + hooks in dbt output #696

drewbanin opened this issue Mar 14, 2018 · 3 comments · Fixed by #1440
Assignees
Labels
good_first_issue Straightforward + self-contained changes, good for new contributors!

Comments

@drewbanin
Copy link
Contributor

drewbanin commented Mar 14, 2018

Feature

dbt doesn't output any info about the start/end hooks that it runs, so it can be hard to understand why the stdout seems to stall. Instead, dbt should log the start/end hooks that it is running to the console.

Example:

$ dbt run

Found 3 models, 2 tests, 0 archives, 0 analyses, 96 macros, 2 operations, 0 seed files

12:27:16 | Concurrency: 8 threads (target='dev')
12:27:16 |
12:27:16 | Running 3 on-run-start hooks:
12:27:16 | 1 of 3 START grant usage on ...
12:27:16 | 2 of 3 START grant create on ...
12:27:16 | 3 of 3 START insert into public._audit ...
12:27:16 |
12:27:16 | Running 2 models:
12:27:16 | 1 of 2 START table model demo_schema.dep............................. [RUN]
12:27:16 | 2 of 2 START incremental model demo_schema.local..................... [RUN]
12:27:16 | 1 of 2 OK created table model demo_schema.dep........................ [SELECT 1 in 0.13s]
12:27:16 | 2 of 2 OK created incremental model demo_schema.local................ [INSERT 0 1 in 0.14s]
12:27:16 |
12:27:16 | Running 3 on-run-end hooks:
12:27:16 | 1 of 3 START grant usage on ...
12:27:16 | 2 of 3 START grant create on ...
12:27:16 | 3 of 3 START insert into public._audit ...
12:27:16 |
12:27:16 | Finished running 1 table models, 1 incremental models, 6 run hooks in 0.32s.

Completed successfully

Done. PASS=2 ERROR=0 SKIP=0 TOTAL=2

If there are no on-run-start/end hooks, dbt should skip those sections of the info logs. Note that we should also add something like 6 run hooks to the final line of model run logs.

^ this is an initial idea of how this could look, but I don't know that I love it. Very open to other ideas!

@cmcarthur cmcarthur added this to the 0.10.2 milestone Apr 26, 2018
@drewbanin drewbanin added the good_first_issue Straightforward + self-contained changes, good for new contributors! label Nov 7, 2018
@drewbanin drewbanin added this to the Wilt Chamberlain milestone Nov 28, 2018
@vijaykiran
Copy link
Contributor

I'd like to take a stab at this.

@drewbanin
Copy link
Contributor Author

Cool @vijaykiran! Let me know if there's anything I can do to help out when you give it a shot :)

vijaykiran added a commit to vijaykiran/dbt that referenced this issue Dec 30, 2018
This commit adds logging info for on-run-start/end hooks (Fixes dbt-labs#696)
@EdPre
Copy link

EdPre commented Mar 19, 2019

This looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good_first_issue Straightforward + self-contained changes, good for new contributors!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants