LoginSignup
1
1

More than 3 years have passed since last update.

Dataform公式がオススメするディレクトリ構成

Last updated at Posted at 2021-05-03

Dataformを導入したときに戸惑うのがディレクトリ構成をどうするか。
自分もこれに迷っていたので資料を探していたところ、公式のオススメが紹介されていたのでまとめる。
https://docs.dataform.co/best-practices/start-your-dataform-project

公式がオススメするディレクトリ構成

Dataformがオススメするのは以下のような構造。
folder_example copy.png

それぞれのフォルダーごとに次のような使い方を想定している。

  • definitions/sources
    • 後の工程で使いやすくするためにデータソースに対して軽い整形を行う。例えば異なるテーブル間で同じカラム名が使われるようにしたり、データ型を統一したりする。
  • definitions/staging
    • 最終的に出したい指標(KPIなど)を出しやすくするために、 sources の異なるテーブルを結合し、整形を行う。
  • definitions/reporting
    • staging フォルダーのデータを元に、集計関数を使いながら見たい指標(KPIなど)を出す。
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1