Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Mar 5, 2024
1 parent 3eb224b commit 9ead534
Show file tree
Hide file tree
Showing 3 changed files with 1,538 additions and 141 deletions.
7 changes: 4 additions & 3 deletions src/preset_cli/cli/superset/sync/dbt/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ def dbt_core( # pylint: disable=too-many-arguments, too-many-branches, too-many

if profiles is None:
profiles = os.path.expanduser("~/.dbt/profiles.yml")
with open(profiles, encoding="utf-8") as inp:
config = yaml.safe_load(inp)
dialect = MFSQLEngine(config[project]["outputs"][target]["type"].upper())

file_path = Path(file)

Expand Down Expand Up @@ -185,6 +182,10 @@ def dbt_core( # pylint: disable=too-many-arguments, too-many-branches, too-many
with open(manifest, encoding="utf-8") as input_:
configs = yaml.load(input_, Loader=yaml.SafeLoader)

with open(profiles, encoding="utf-8") as input_:
config = yaml.safe_load(input_)
dialect = MFSQLEngine(config[project]["outputs"][target]["type"].upper())

model_schema = ModelSchema()
models = []
for config in configs["nodes"].values():
Expand Down
Loading

0 comments on commit 9ead534

Please sign in to comment.