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

Add CLI option to print all error's compiled SQL #1803

Closed
vitorbaptista opened this issue Oct 4, 2019 · 2 comments
Closed

Add CLI option to print all error's compiled SQL #1803

vitorbaptista opened this issue Oct 4, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@vitorbaptista
Copy link
Contributor

Describe the feature

A new flag to dbt test that prints the compiled SQL files of the test failures automatically, to help debugging the errors. This is specially useful for CI tests, as the user can't simply open the file from its filepath.

Describe alternatives you've considered

Adding a cat target/compiled/**/*.sql or similar after dbt test is run. But this would print all compiled test files, which would be too noisy.

Who will this benefit?

Users that run dbt on a CI. They would not only have the list of tests that failed, but also their SQL code, to help debug the failure.

@vitorbaptista vitorbaptista added enhancement New feature or request triage labels Oct 4, 2019
@drewbanin drewbanin removed the triage label Oct 7, 2019
@drewbanin
Copy link
Contributor

Thanks for the suggestion @vitorbaptista! Sure, I think this is a great idea. What kind of flag do you have in mind?

We've talked about adding a --verbose flag before (#619) -- do you think it would make sense to use a catch-all flag like this, or a specific flag like --show-test-sql-on-failure? I imagine the latter would lead to a whole lot of one-off flags like this

@drewbanin
Copy link
Contributor

closing this in favor of #1173 -- these schema test blocks will have enough info to emit helpful error messages about why they failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants