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

Make printer width configurable #1026

Closed
jon-rtr opened this issue Sep 26, 2018 · 3 comments
Closed

Make printer width configurable #1026

jon-rtr opened this issue Sep 26, 2018 · 3 comments
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors!

Comments

@jon-rtr
Copy link
Contributor

jon-rtr commented Sep 26, 2018

Feature

Feature description

When executing, dbt run, I find that the printer width (hardcoded to 80) is too small given the length of my schema and table names. I would like to make this configurable so that the results (RUN, SUCCESS, FAIL, SKIP) align in a column on the right-hand side instead of being staggered.

Here is the relevant line:
https://github.com/fishtown-analytics/dbt/blob/6454a81593e0311ac1d796b43f95a32cb8be4b53/dbt/ui/printer.py#L62

Example

default width of 80

11:02:57 | Concurrency: 4 threads (target='stg_dbt')
11:02:57 | 
11:02:57 | 1 of 3 START table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_DAILY_TEMP.... [RUN]
11:07:23 | 1 of 3 OK created table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_DAILY_TEMP [SUCCESS 1 in 265.90s]
11:07:23 | 2 of 3 START table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_DAILY [RUN]
11:07:58 | 2 of 3 OK created table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_DAILY [SUCCESS 1 in 34.27s]
11:07:58 | 3 of 3 START table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_MONTHLY [RUN]
11:08:18 | 3 of 3 OK created table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_MONTHLY [SUCCESS 1 in 20.77s]
11:08:18 | 
11:08:18 | Finished running 3 table models in 327.56s.

hand-updated width of 120

11:02:57 | Concurrency: 4 threads (target='stg_dbt')
11:02:57 | 
11:02:57 | 1 of 3 START table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_DAILY_TEMP............................................ [RUN]
11:07:23 | 1 of 3 OK created table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_DAILY_TEMP....................................... [SUCCESS 1 in 265.90s]
11:07:23 | 2 of 3 START table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_DAILY..................................... [RUN]
11:07:58 | 2 of 3 OK created table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_DAILY................................ [SUCCESS 1 in 34.27s]
11:07:58 | 3 of 3 START table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_MONTHLY................................... [RUN]
11:08:18 | 3 of 3 OK created table model DBT_SCRATCH_PUBLIC.TOTAL_UNIT_TIME_SERIES_MONTHLY.............................. [SUCCESS 1 in 20.77s]
11:08:18 | 
11:08:18 | Finished running 3 table models in 327.56s.

Who will this benefit?

Anyone else who has long names and wants more readable console output.

@drewbanin
Copy link
Contributor

hah, this is a great idea @jon-rtr! I've wanted to improve the stdout for a while, possibly also doing something like this to collapse the RUN and SUCCESS lines, but I can't think of a good way to do that with multithreading. I think expanding the output width is a good start :)

@drewbanin drewbanin added enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! labels Sep 26, 2018
@jon-rtr
Copy link
Contributor Author

jon-rtr commented Sep 26, 2018

Sounds good.

I would also love to have this same output emitted as JSON, a la snowplow analytics, so that I can run analyses on our pipelines (how meta).

We use Splunk, so maybe that emission could be configurable? Maybe it starts as a separate file that can then be forwarded to an arbitrary endpoint using a small amount of glue code?

@drewbanin
Copy link
Contributor

Fixed in #1459 via #1247

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

No branches or pull requests

2 participants