Skip to content

Commit

Permalink
README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gouline committed Jan 24, 2024
1 parent c2796fc commit 3908284
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ dbt-metabase models \
--metabase-url https://metabase.example.com \
--metabase-username [email protected] \
--metabase-password Password123 \
--metabase-database business
--metabase-database business \
--include-schemas public
```

Open Metabase and go to Settings > Admin Settings > Table Metadata, you will notice that `id` column in `stg_users` is now marked as "Entity Key" and `group_id` is a "Foreign Key" pointing to `id` in `stg_groups`.
Expand Down Expand Up @@ -209,7 +210,8 @@ dbt-metabase exposures \
--metabase-url https://metabase.example.com \
--metabase-username [email protected] \
--metabase-password Password123 \
--output-path models/
--output-path models/ \
--exclude-collections temporary
```

Once the execution completes, check your output path for exposures files containing descriptions, creator details and links for Metabase questions and dashboards:
Expand Down Expand Up @@ -274,7 +276,7 @@ Note that common configurations are in the outer block and command-specific ones
Alternatively, you can invoke dbt-metabase programmatically. Below is the equivalent of CLI examples:

```python
from dbtmetabase import DbtMetabase
from dbtmetabase import DbtMetabase, Filter
# Initializing instance
c = DbtMetabase(
Expand All @@ -285,10 +287,16 @@ c = DbtMetabase(
)
# Exporting models
c.export_models(metabase_database="business")
c.export_models(
metabase_database="business",
schema_filter=Filter(include=["public"]),
)
# Extracting exposures
c.extract_exposures(output_path=".")
c.extract_exposures(
output_path=".",
collection_filter=Filter(exclude=["temporary"]),
)
```

See function header comments for information about other parameters.
Expand Down

0 comments on commit 3908284

Please sign in to comment.