Bug: properties gets argument in a strange form with a curvy brace } at the end and fails
Gregory108 opened this issue ยท 7 comments
Execution of:
dbt-invoke properties --models model_name
Gives error:
Command: 'dbt run-operation --project-dir D:\Osome\Analytics\analytics_dbt _log_columns_list --
args '{"resource_name": "model_name"}''Exit code: 2
...
dbt: error: unrecognized arguments: model_name}'
No idea, how to debug it!)
Setup:
- Python 3.7.*
- dbt 3.19.*
Thanks for reporting this @Gregory108. I'm looking into it. At first glance, I'm thinking the issue may stem from us not correctly handling Windows paths. I'll update here once I have more information.
Hi,
Having the same problem. I found the problem at least but not sure of the solution:
dbt-invoke properties generates this:
dbt run-operation --project-dir C:\\Users\\my_user\\projects\\dbt _log_columns_list --args \'{"resource_name": "model_name_specified"}\'
when it should be this:
dbt run-operation --project-dir C:\\Users\\my_user\\projects\\dbt _log_columns_list --args '{"resource_name": "model_name_specified"}'
So for some reason the script generates those \
also around the args, hmmh...
Setup:
- Python 3.8.10
- dbt 0.20.0
- Windows
@jcopr thanks for posting that information! I also, simultaneously to you, narrowed it down to the quoting of the args. I see that you found the Pull Request #4 which is now merged. A new release has been created (dbt-invoke==0.1.1).
Are you (or @Gregory108) able to update to the latest version of dbt-invoke and confirm whether the changes alleviate this issue for you?
I'll test tomorrow, will comment back here then. And thanks @robastel this seems like an excellent package, we have been using dbt now for 3 years or so ๐
@jcopr I'm just checking in to see if you had a chance to test. If you are busy, no worries, I'll close for now and reopen the issue if it pops up again.
And thanks for the compliment!
@robastel It works! Thank you so much!
This automation of properties update goes straight into my workflow now! (And, hopefully, my teammates as well!=)
@Gregory108 Excellent, I'm glad to hear about the workflow! And thanks for confirming that it's working for you now.