-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from jitsucom/initial_commit
Initial commit
- Loading branch information
Showing
18 changed files
with
2,310 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.idea | ||
|
||
target/ | ||
dbt_modules/ | ||
logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# dbt-jitsu | ||
This [dbt package](https://docs.getdbt.com/docs/package-management): | ||
* Transforms pageviews into sessions | ||
* For User stitching please enable builtin Jitsu feature [Retrospective User Recognition](https://jitsu.com/docs/other-features/retrospective-user-recognition) | ||
|
||
|
||
## Installation instructions | ||
New to dbt packages? Read more about them [here](https://docs.getdbt.com/docs/building-a-dbt-project/package-management/). | ||
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**. | ||
|
||
```YAML | ||
# dbt_project.yml | ||
config-version: 2 | ||
... | ||
|
||
vars: | ||
jitsu: | ||
jitsu_events_table: "{{ source('jitsu', 'pageviews') }}" #or plane table path like database.schema.table_name | ||
|
||
``` | ||
|
||
4. Optionally configure extra parameters by adding them to your own `dbt_project.yml` file – see [dbt_project.yml](dbt_project.yml) | ||
for more details: | ||
|
||
```YAML | ||
# 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 | ||
|
||
``` | ||
5. Execute `dbt seed` -- this project includes a CSV that must be seeded for it | ||
the package to run successfully. | ||
6. 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](https://clickhouse.tech/docs/en/sql-reference/window-functions/) | ||
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! |
Empty file.
Oops, something went wrong.