-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 the ability to perform dbt code/lint checks without actually connecting #3135
Comments
Hey @robbruce, thanks for the thoughtful issue. You're right that the words here can be a bit confusing, and we could do more to clarify exactly what's happening. dbt invocations, such as
The Instead, it sounds like what you want is step 1 only: parse the project, and make sure there are no Jinja/YAML syntax errors. There are two commands you can use today that do not require database connections, and which will catch that category of error:
Does either of |
Hi @jtcohen6 I don't think either command does a code check for what we're asking for.
Scenario 3 doesn't raise an error if |
Thanks for checking those out @robbruce! The
If you're calling FYI the I'm going to close this issue, since it sounds like the primary thing you're asking for—raise Jinja/YAML errors without connecting to the database—can be accomplished with existing commands. |
Describe the feature
Currently,
dbt compile
connects to where the data is stored, this was unexpected as normally when code is compiled its not connecting to anything, it's just compiling.A feature to allow checking if the engineer has written valid dbt code, so correct parameters passed into macros, .yml files structurally correct would be very useful.
Proposing a
dbt check
command for this.Describe alternatives you've considered
Tried
dbt compile
, but it does more than just compile, it connects to the database.Additional context
As part of a CI/CD pipeline, having the ability for code checks allows for system generated feedback to be provided as part of a peer review process.
Who will this benefit?
DBT Developers
Are you interested in contributing this feature?
Would contribute, but don't know where to start and if this is actually doable.
The text was updated successfully, but these errors were encountered: