dbx
dbx copied to clipboard
Remove extension check in jinja-variables-file option
trafficstars
Expected Behavior
YAML is a superset of JSON (as long as you quote all your strings). The jinja-variables-file wants to parse the file using the YAML parser. Therefore it should be valid to give it a json file. I want to be able to do --jinja-variables-file=myconfig.json.
Current Behavior
I can actually pass a file --jinja-variables-file=myconfig.json.yml where the contents are a pure json object. The extension is enforced in a check in file dbx\callbacks.py: from line 15: if value.suffix not in [".yaml", ".yml"]: raise.... This check is not necessary.
Steps to Reproduce (for bugs)
Just run the tool as dbx deploy --jinja-variables-file=myconfig.json to see the error.
Context
Your Environment
- dbx version used: 0.8.11
- Databricks Runtime version: 9.1