From 596ff15c2beb96ec9dac45187783f0956a03cf3c Mon Sep 17 00:00:00 2001 From: datnguye Date: Sat, 2 Sep 2023 18:15:28 +0700 Subject: [PATCH] docs: Update readme --- README.md | 1 + docs/index.md | 64 +++++++++++++++++++++++++++------------------------ 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index d2fc506..d0b8243 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ pip install dbterd --upgrade ``` Verify installation: + ```bash dbterd --version ``` diff --git a/docs/index.md b/docs/index.md index 3ce3c94..1725ea1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ # dbterd -CLI to generate Diagram-as-a-code file ([DBML](https://dbdiagram.io/d), [Mermaid](https://mermaid-js.github.io/mermaid-live-editor/), [PlantUML](https://plantuml.com/ie-diagram), [GraphViz](https://graphviz.org/), [D2](https://d2lang.com/)) from dbt artifact files (required: [![dbt](https://img.shields.io/badge/manifest.json-upto--v9-3776AB.svg?style=flat&logo=dbt&logoColor=orange)](https://schemas.getdbt.com/) [![dbt](https://img.shields.io/badge/catalog.json-upto--v1-3776AB.svg?style=flat&logo=dbt&logoColor=orange)](https://schemas.getdbt.com/)) +CLI to generate Diagram-as-a-code file ([DBML](https://dbdiagram.io/d), [Mermaid](https://mermaid-js.github.io/mermaid-live-editor/), [PlantUML](https://plantuml.com/ie-diagram), [GraphViz](https://graphviz.org/), [D2](https://d2lang.com/)) from dbt artifact files (required: [![dbt](https://img.shields.io/badge/manifest.json-upto--v10-3776AB.svg?style=flat&logo=dbt&logoColor=orange)](https://schemas.getdbt.com/) [![dbt](https://img.shields.io/badge/catalog.json-upto--v1-3776AB.svg?style=flat&logo=dbt&logoColor=orange)](https://schemas.getdbt.com/)) [![PyPI version](https://badge.fury.io/py/dbterd.svg)](https://pypi.org/project/dbterd/) ![python-cli](https://img.shields.io/badge/CLI-Python-FFCE3E?labelColor=14354C&logo=python&logoColor=white) @@ -15,7 +15,7 @@ CLI to generate Diagram-as-a-code file ([DBML](https://dbdiagram.io/d), [Mermaid restart ↻ -Verify installed version: +Verify installation: ```bash dbterd --version @@ -23,34 +23,38 @@ dbterd --version ## Quick examine with existing samples -```bash -# select all models in dbt_resto -dbterd run -ad samples/dbtresto -o target -# select all models in dbt_resto, Select multiple dbt resources -dbterd run -ad samples/dbtresto -o target -rt model -rt source -# select only models in dbt_resto excluding staging -dbterd run -ad samples/dbtresto -o target -s model.dbt_resto -ns model.dbt_resto.staging -# select only models in schema name mart excluding staging -dbterd run -ad samples/dbtresto -o target -s schema:mart -ns model.dbt_resto.staging -# select only models in schema full name dbt.mart excluding staging -dbterd run -ad samples/dbtresto -o target -s schema:dbt.mart -ns model.dbt_resto.staging - -# other samples -dbterd run -ad samples/fivetranlog -o target -dbterd run -ad samples/fivetranlog -o target -rt model -rt source - -dbterd run -ad samples/facebookad -o target -dbterd run -ad samples/facebookad -o target -rt model -rt source - -dbterd run -ad samples/shopify -o target -dbterd run -ad samples/shopify -o target -rt model -rt source - -dbterd run -ad samples/dbt-constraints \ - -a "test_relationship:(name:foreign_key|c_from:fk_column_name|c_to:pk_column_name)" - -# your own sample without commiting to repo -dbterd run -ad samples/local -o target -rt model -rt source -``` +
+ Click me + + ```bash + # select all models in dbt_resto + dbterd run -ad samples/dbtresto + # select all models in dbt_resto, Select multiple dbt resources + dbterd run -ad samples/dbtresto -rt model -rt source + # select only models in dbt_resto excluding staging + dbterd run -ad samples/dbtresto -s model.dbt_resto -ns model.dbt_resto.staging + # select only models in schema name mart excluding staging + dbterd run -ad samples/dbtresto -s schema:mart -ns model.dbt_resto.staging + # select only models in schema full name dbt.mart excluding staging + dbterd run -ad samples/dbtresto -s schema:dbt.mart -ns model.dbt_resto.staging + + # other samples + dbterd run -ad samples/fivetranlog + dbterd run -ad samples/fivetranlog -rt model -rt source + + dbterd run -ad samples/facebookad + dbterd run -ad samples/facebookad -rt model -rt source + + dbterd run -ad samples/shopify -s wildcard:*shopify.shopify__* + dbterd run -ad samples/shopify -rt model -rt source + + dbterd run -ad samples/dbt-constraints -a "test_relationship:(name:foreign_key|c_from:fk_column_name|c_to:pk_column_name)" + + # your own sample without commiting to repo + dbterd run -ad samples/local -rt model -rt source + ``` + +
## Quick DEMO