fullstorydev / dbt_fullstory

The official FullStory dbt package
Apache License 2.0
2 stars 3 forks source link

use incremental models to save time / money #8

Closed huttotw closed 9 months ago

huttotw commented 1 year ago

This changes our highly used models to the materialization type incremental so that we only update rows that need to be updated when new data comes in.

In order to make this efficient, I had to change stg_events__all to also be incremental and add some partitioning / clustering logic. This change alone makes the life of all the down stream tables much easier.

Now users, and sessions are incrementally loaded which results in a dramatic decrease of processed bytes for each dbt run. Internally, I have measured this at a > 99% reduction in the amount of processing required to load new data.