Skip to content

Commit

Permalink
Merge pull request #185 from dbt-labs/pass-args-as-str
Browse files Browse the repository at this point in the history
pass args as string
  • Loading branch information
dave-connors-3 authored Oct 18, 2023
2 parents b56dbe0 + 301bb6d commit 9edf5f0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dbt_meshify/dbt_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,17 @@ def select_resources(
) -> Set[str]:
"""Select dbt resources using NodeSelection syntax"""
args = []
# import pdb; pdb.set_trace()
if select:
args = ["--select", select]
args = ["--select", " ".join(select) if not isinstance(select, str) else select]
if exclude:
args.extend(["--exclude", exclude])
args.extend(
["--exclude", " ".join(exclude) if not isinstance(exclude, str) else exclude]
)
if selector:
args.extend(["--selector", selector])
args.extend(
["--selector", " ".join(selector) if not isinstance(selector, str) else selector]
)

results = self.dbt.ls(self.path, args, output_key=output_key)
if output_key:
Expand Down

0 comments on commit 9edf5f0

Please sign in to comment.