Skip to content

Commit

Permalink
[Bug] PR-55 Fix option --dbt-list doesn't work issue
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Huang <kent@infuseai.io>
  • Loading branch information
kentwelcome committed Dec 19, 2023
1 parent 2eb11f7 commit e50d5ca
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 e50d5ca

Please sign in to comment.