forked from Velir/dbt-ga4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbt_project.yml
54 lines (48 loc) · 2.25 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: 'ga4'
version: '2.0.1'
config-version: 2
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_packages"
# The following variables should be set in the project that loads this package.
#vars:
# project: "your_project"
# dataset: "your_dataset"
# start_date: "20210120" # Defines the earliest GA4 event _TABLE_SUFFIX to load into base events model.
# frequency: daily # daily|streaming defaults to daily. If you only use the streaming export, use this setting to only get the streaming data.
# Query parameter exclusions
# You can remove specific query parameters from the page_location by listing them here
# query_parameter_exclusions: ["gclid","fbclid","_ga"]
# User Properties
# User-scoped event properties can be assigned using the following variable configuration in your dbt_project.yml
# The dim_ga4__users dimension table will be updated to include the last value seen for each user
# user_properties:
# - event_parameter: "page_location"
# user_property_name: "most_recent_page_location"
# value_type: "string_value"
# - event_parameter: "another_event_param"
# user_property_name: "most_recent_param"
# value_type: "string_value"
# Custom parameters
# custom parameters are registered by creating a var matching the event name where the custom parameter occurs
# and providing the name, matching the parameters name
# and matching the value_type to the type of column in BigQuery (string_value, int_value, float_value, double_value)
# the below example shows a page_view enhanced with the clean_event event parameter from the ga4_obfuscated_sample_ecommerce project
# page_view:
# - name: "clean_event"
# value_type: "string_value"
# The main base events model is materialized as a partitioned, incremental table
# The staging models are materialized as views
# The dimensional models are materialized as tables
models:
ga4:
+materialized: view
marts:
+materialized: "{{ 'table' if target.name == 'prod' else 'view' }}"