forked from dbt-labs/segment
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdbt_project.yml
39 lines (36 loc) · 1.95 KB
/
dbt_project.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: 'segment_metrics'
version: '1.0.0'
require-dbt-version: [">=1.0.0", "<2.0.0"]
config-version: 2
#convention to follow is base tables should be fresh and only calculated when creating/updating metrics which depend on the tables
#materializing as views will help us save storage space, avoid duplication of tables, and also help us get a fresh batch of data on each run
#we are still exploring if base tables should be materialized as incremental. Feel free to raise an issue regarding it
models:
segment_metrics:
base:
+materialized: table
metrics:
+materialized: table
vars:
#sources have been defined in sources.yml inside base folder
segment_page_views_table: "{{ source('segment', 'pages') }}"
segment_tracks_table: "{{ source('segment', 'tracks') }}"
segment_users_table: "{{ source('segment', 'users') }}"
segment_identifies_table: "{{ source('segment', 'identifies') }}"
# number of trailing hours to re-sessionize for.
# events can come in late and we want to still be able to incorporate
# them into the definition of a session without needing a full refresh.
segment_sessionization_trailing_window: 3
# sessionization inactivity cutoff: of there is a gap in page view times
# that exceeds this number of seconds, the subsequent page view will
# start a new session.
segment_inactivity_cutoff: 30 * 60
# If there are extra columns you wish to pass through this package,
# define them here. Columns will be included in the `segment_web_sessions`
# model as `first_<column>` and `last_<column>`. Extremely useful when
# using this package on top of unioned Segment sources, as you can then
# pass through a column indicating which source the data is from.
segment_pass_through_columns: []
# BigQuery only: partition granularity for partition_by clause
# options can be found here: https://docs.getdbt.com/reference/resource-configs/bigquery-configs#partition-clause
segment_bigquery_partition_granularity: "day"