Skip to content

Commit

Permalink
revert flag name now that we have alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-float-on committed Mar 15, 2024
1 parent da0ea82 commit fca6763
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions dbtmetabase/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,19 +360,19 @@ def models(
help="Include personal Metabase collections.",
)
@click.option(
"--exclude-unverified-cards",
envvar="EXCLUDE_UNVERIFIED_CARDS",
"--exclude-unverified",
envvar="EXCLUDE_UNVERIFIED",
show_envvar=True,
is_flag=True,
help="Exclude cards that have not been verified.",
help="Exclude items that have not been verified. Only applies to entity types that support verification.",
)
def exposures(
output_path: str,
output_grouping: Optional[str],
include_collections: Optional[Sequence[str]],
exclude_collections: Optional[Sequence[str]],
allow_personal_collections: bool,
exclude_unverified_cards: bool,
exclude_unverified: bool,
core: DbtMetabase,
):
core.extract_exposures(
Expand All @@ -383,7 +383,7 @@ def exposures(
exclude=exclude_collections,
),
allow_personal_collections=allow_personal_collections,
exclude_unverified_cards=exclude_unverified_cards,
exclude_unverified=exclude_unverified,
)


Expand Down
6 changes: 3 additions & 3 deletions dbtmetabase/_exposures.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def extract_exposures(
output_grouping: Optional[str] = None,
collection_filter: Optional[Filter] = None,
allow_personal_collections: bool = False,
exclude_unverified_cards: bool = False,
exclude_unverified: bool = False,
) -> Iterable[Mapping]:
"""Extract dbt exposures from Metabase.
Expand All @@ -55,7 +55,7 @@ def extract_exposures(
output_grouping (Optional[str], optional): Grouping for output YAML files, supported values: "collection" (by collection slug) or "type" (by entity type). Defaults to None.
collection_filter (Optional[Filter], optional): Filter Metabase collections. Defaults to None.
allow_personal_collections (bool, optional): Allow personal Metabase collections. Defaults to False.
exclude_unverified_cards (bool, optional): Exclude unverified cards. Defaults to False.
exclude_unverified (bool, optional): Exclude items that have not been verified. Only applies to entity types that support verification. Defaults to False.
Returns:
Iterable[Mapping]: List of parsed exposures.
Expand Down Expand Up @@ -92,7 +92,7 @@ def extract_exposures(
models=("card", "dashboard"),
):
if (
exclude_unverified_cards
exclude_unverified
and item["model"] == "card"
and item.get("moderated_status") != "verified"
):
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/api/dashboard/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"updated_at": "2021-07-21T08:01:37.372373Z",
"col": 0,
"id": 1,
"id": 100,
"parameter_mappings": [],
"card_id": null,
"visualization_settings": {
Expand Down

0 comments on commit fca6763

Please sign in to comment.