You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
When i add new model to my dbt project and call dbt parse everything works fine and the model appears in manifest.json file. Then I make any change to the yaml file where a model is described (for example add new column) and run dbt parse again, I get DuplicatePatchPathError:
Compilation Error
dbt found two schema.yml entries for the same resource named test_catalog.test_schema.test_model. Resources and their associated columns may only be described a single time. To fix this, remove one of the resource entries for test_catalog.test_schema.test_model in this file:
- models\marts\dbt_test_marts\test_catalog.test_schema.test_model.yml
When I change any other files related to this model and keep yaml intouched, partial parsing works fine.
I know that this issue can be avoided by use full parsing instead of partial but dbt projects may be very big and parsing all the project each time we change a single model may be time consuming and costly.
Expected Behavior
Dbt allows to do partial parsing when schema is changed.
Steps To Reproduce
Add the following test_catalog.test_schema.test_model.yml and test_catalog.test_schema.test_model.sql files to your project:
Maybe we can somehow pass a flag of partial parsing to NodePatchParser to conditionally avoid patch_path check and let partial parsing happen? If I remove check of patch_path from lines 848-850 of core/dbt/parser/schemas.py, partial parsing works fine for me.
I use dbt-trino adapter but I believe the problem comes from dbt-core.
The text was updated successfully, but these errors were encountered:
Is this a new bug in dbt-core?
Current Behavior
When i add new model to my dbt project and call
dbt parse
everything works fine and the model appears in manifest.json file. Then I make any change to the yaml file where a model is described (for example add new column) and rundbt parse
again, I get DuplicatePatchPathError:When I change any other files related to this model and keep yaml intouched, partial parsing works fine.
I know that this issue can be avoided by use full parsing instead of partial but dbt projects may be very big and parsing all the project each time we change a single model may be time consuming and costly.
Expected Behavior
Dbt allows to do partial parsing when schema is changed.
Steps To Reproduce
Add the following
test_catalog.test_schema.test_model.yml
andtest_catalog.test_schema.test_model.sql
files to your project:SELECT 1 as col1
Then parse the project with this command
dbt parse --profiles-dir . --project-dir ./dbt --log-path ./dbt/logs --target-path ./target --debug
Then change
test_catalog.test_schema.test_model.yml
file by adding new column:Then run again
dbt parse --profiles-dir . --project-dir ./dbt --log-path ./dbt/logs --target-path ./target --debug
Relevant log output
Environment
Which database adapter are you using with dbt?
other (mention it in "Additional Context")
Additional Context
I did some research and found that if we have
patch_path
property in a model manifest, we get theDuplicatePatchPathError
dbt-core/core/dbt/parser/schemas.py
Line 848 in 77d8e32
But when we add a new model, the parser sets this property from file id which does not allow us patching the manifestin the future:
dbt-core/core/dbt/parser/schemas.py
Line 865 in 77d8e32
Maybe we can somehow pass a flag of partial parsing to
NodePatchParser
to conditionally avoid patch_path check and let partial parsing happen? If I remove check ofpatch_path
from lines 848-850 of core/dbt/parser/schemas.py, partial parsing works fine for me.I use dbt-trino adapter but I believe the problem comes from dbt-core.
The text was updated successfully, but these errors were encountered: