📖
【dbt Docs】Building a dbt Project - Documentation (未完、後回し)
Documentation
(この章は現時点でそこまでいらないと思うので、さっと流す)
Related documentation
- プロパティの宣言
-
dbt docsコマンド- サブコマンド
generate,serve -
dbt docsはドキュメントを生成する-
target/ディレクトリに、index.htmlを生成する target/manifest.json-
target/catgalog.jsonを生成、メタデータとか依存関係とか
-
-
generateがファイルの生成 -
serveは、Webサーバを立ち上げる
- サブコマンド
docJinja function
Assumed knowledge
Overview
dbtは、dbtプロジェクトのドキュメントを生成し、それをWebサイトとしてレンダリングする方法を提供します。
- プロジェクトに関する情報:モデルコード、プロジェクトのDAG、列に追加したテストなどが含まれます。
- データウェアハウスに関する情報:列のデータ型やテーブルのサイズなど。この情報は、情報スキーマに対してクエリを実行することによって生成されます。
デフォルトで自動生成される項目以外も追加することができる。
Adding descriptions to your project
(記載を追加する)
description:を宣言する
models/<file_name>.yml
version: 2
models:
- name: events
description: This table contains clickstream events from the marketing website
columns:
- name: event_id
description: This is a unique identifier for the event
tests:
- unique
- not_null
- name: user-id
quote: true
description: The user who performed the event
tests:
- not_null
Discussion