Skip to content

Commit

Permalink
Merge pull request #933 from InfuseAI/feature/pr-55-piperider-run-opt…
Browse files Browse the repository at this point in the history
…ions-dbt-list-doesnt-work

[Bug] PR-55 Fix option `--dbt-list` doesn't work issue
  • Loading branch information
kentwelcome authored Dec 19, 2023
2 parents 2eb11f7 + e50d5ca commit e2fdb2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions piperider_cli/dbtutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from jinja2 import UndefinedError
from rich.console import Console
from rich.table import Table
from piperider_cli import yaml as pyml

from piperider_cli import load_jinja_template, load_jinja_string_template
from piperider_cli import yaml as pyml
from piperider_cli.dbt.list_task import load_manifest, list_resources_unique_id_from_manifest, load_full_manifest
from piperider_cli.error import \
DbtProjectInvalidError, \
Expand Down Expand Up @@ -185,7 +185,9 @@ def get_dbt_state_candidate(dbt_state_dir: str, options: dict, *, select_for_met
def profiling_chosen_fn(key, node):
statistics = Statistics()
if dbt_resources:
chosen = node.get('unique_id') in dbt_resources['models']
fqn = '.'.join(node.get('fqn'))
unique_id = node.get('unique_id')
chosen = unique_id in dbt_resources['models'] or fqn in dbt_resources['models']
if not chosen:
statistics.add_field_one('filter')
return chosen
Expand Down

0 comments on commit e2fdb2c

Please sign in to comment.