Skip to content

jitsucom/dbt-jitsu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbt-jitsu

This dbt package:

Installation instructions

New to dbt packages? Read more about them here.

  1. Include this package in your packages.yml
  2. Run dbt deps
  3. Include the following in your dbt_project.yml directly within your vars: block (making sure to handle indenting appropriately). Update the value to point to your jitsu pageviews table.
# dbt_project.yml
config-version: 2
...

vars:
  jitsu:
     jitsu_events_table: "{{ source('jitsu', 'pageviews') }}" #or plane table path like database.schema.table_name
  1. Optionally configure extra parameters by adding them to your own dbt_project.yml file – see dbt_project.yml for more details:
# dbt_project.yml
config-version: 2

...

vars:
   jitsu:
    jitsu_events_table: "{{ source('jitsu', 'pageviews') }}"
    jitsu_sessionization_trailing_window: 3
    jitsu_session_inactivity_cutoff: 30 * 60
    jitsu_pass_through_columns: ['event_type']
    jitsu_model_materialized: incremental
  1. Execute dbt seed -- this project includes a CSV that must be seeded for it the package to run successfully.
  2. Execute dbt run – the Jitsu Sessions models will get built

Database support

This package has been tested on PostgreSQL, ClickHouse, Redshift and BigQuery.

ClickHouse implementation details

This package relies heavily on SQL window functions. Because Window functions are considered as an experimental feature in ClickHouse we cannot guarantee stable results of using this package with ClickHouse database

Currently, this package doesn't support incremental materialization with ClickHouse. Please set jitsu_model_materialized to table

Contributing

Additional contributions to this repo are very welcome!