dbt: Fix --target-path CLI flag being ignored (#4141)#4298
Merged
Conversation
The --target-path CLI flag was not being parsed from command line arguments and passed to the DbtStructuredLogsProcessor and DbtLocalArtifactProcessor constructors. This caused the processors to always use the default target path instead of the user-specified one. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Gaurav Sahu <Gaurav.sahu@atlan.com>
|
Thanks for opening your first OpenLineage pull request! We appreciate your contribution. If you haven't already, please make sure you've reviewed our guide for new contributors (https://github.com/OpenLineage/OpenLineage/blob/main/CONTRIBUTING.md). |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4298 +/- ##
=======================================
Coverage 71.68% 71.68%
=======================================
Files 21 21
Lines 2179 2179
=======================================
Hits 1562 1562
Misses 617 617 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kacpermuda
approved these changes
Jan 30, 2026
|
Great job! Congrats on your first merged pull request in OpenLineage! |
ah12068
pushed a commit
to ah12068/OpenLineage
that referenced
this pull request
Feb 3, 2026
…nLineage#4298) The --target-path CLI flag was not being parsed from command line arguments and passed to the DbtStructuredLogsProcessor and DbtLocalArtifactProcessor constructors. This caused the processors to always use the default target path instead of the user-specified one. Signed-off-by: Gaurav Sahu <Gaurav.sahu@atlan.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
ah12068
pushed a commit
to ah12068/OpenLineage
that referenced
this pull request
Feb 3, 2026
…nLineage#4298) The --target-path CLI flag was not being parsed from command line arguments and passed to the DbtStructuredLogsProcessor and DbtLocalArtifactProcessor constructors. This caused the processors to always use the default target path instead of the user-specified one. Signed-off-by: Gaurav Sahu <Gaurav.sahu@atlan.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
ah12068
pushed a commit
to ah12068/OpenLineage
that referenced
this pull request
Feb 3, 2026
…nLineage#4298) The --target-path CLI flag was not being parsed from command line arguments and passed to the DbtStructuredLogsProcessor and DbtLocalArtifactProcessor constructors. This caused the processors to always use the default target path instead of the user-specified one. Signed-off-by: Gaurav Sahu <Gaurav.sahu@atlan.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Jeremy Dang <jeremy.dang@crugroup.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
--target-pathCLI flag was not being parsed from command line arguments and passed to theDbtStructuredLogsProcessorandDbtLocalArtifactProcessorconstructors. This caused the processors to always use the default target path instead of the user-specified one.One-line summary for changelog:
Fix
--target-pathCLI flag being ignored indbt-olcommand (#4141)Meaningful description
Problem: When running
dbt-ol run --target-path /custom/path, the--target-pathCLI flag was being ignored. The tool would always look for artifacts (run_results.json, manifest.json, etc.) in the defaulttarget/ directoryinstead of the user-specified path.Root cause: The main() function in
integration/dbt/src/openlineage/dbt/__init__.pywas not parsing the--target-pathargument from the command line. AlthoughDbtLocalArtifactProcessoralready accepts atarget_pathparameter and has proper precedence logic inbuild_target_path(), the value was never being extracted from CLI arguments and passed to the processor constructors.Solution: Parse
--target-pathfrom CLI arguments in main() and pass it through to bothconsume_structured_logs()andconsume_local_artifacts()functions, which then forward it to their respective processor constructors (DbtStructuredLogsProcessorandDbtLocalArtifactProcessor).Alternatives considered: None - this was a straightforward bug fix where the existing infrastructure to handle target_path was already in place but simply not being utilized.