Skip to content

Commit

Permalink
Fix to load dbt vars using yaml instead of json (#107)
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Ishikawa <[email protected]>
  • Loading branch information
yu-iskw authored Sep 22, 2023
1 parent 3606c35 commit fca3033
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dbt_osmosis/vendored/dbt_core_interface/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import hmac
import http.client as httplib
import itertools
import yaml
import json
import logging
import mimetypes
Expand Down Expand Up @@ -269,10 +270,10 @@ def vars(self, v: Union[str, Dict[str, Any]]) -> None:
"""
if (__dbt_major_version__, __dbt_minor_version__) >= (1, 5):
if isinstance(v, str):
v = json.loads(v)
v = yaml.safe_load(v)
else:
if isinstance(v, dict):
v = json.dumps(v)
v = yaml.dump(v)
self._vars = v


Expand Down

0 comments on commit fca3033

Please sign in to comment.