This step assumes you have data in the
ATOMIC.SAMPLE_EVENTStable which will be used to demonstrate how to set-up and run the snowplow-mobile dbt package to model Snowplow mobile data.
The snowplow_mobile dbt package comes with a list of variables specified with a default value that you may need to overwrite in your own dbt project’s
dbt_project.yml file. For details you can have a look at our docs
which contains descriptions and default values of each variable, or you can look in the installed package’s project file which can be found at
For the sake of simplicity we have selected the variables that you will most likely need to overwrite, the rest can be changed at a later stage if and when it is needed.
snowplow__start_date: The date of the first tracked event.
snowplow__enable_mobile_context: Disabled by default, enables the mobile (or platform) context with device information
snowplow__enable_geolocation_context: Disabled by default, enables geolocation context
snowplow__enable_application_context: Disabled by default, enables application context
snowplow__enable_screen_context: Disabled by default, enables screen context with the current screen view information
snowplow__events: Variable to overwrite the events table in case it is named differently. It would have to be modified when using the sample_events table as a base.
Add the following snippet to the
vars: snowplow_mobile: snowplow__start_date: '2021-09-01' snowplow__backfill_limit_days: 400 # in order to load the whole sample dataset snowplow__enable_mobile_context: true snowplow__enable_geolocation_context: true snowplow__enable_application_context: true snowplow__enable_screen_context: true snowplow__events: 'atomic.sample_events'
The mobile package provides a suite of suggested selectors to help run and test the models, these group our (and any custom) models together in a single identifier.
These are defined in the selectors.yml file within the package, however to use these model selections you will need to copy this file into your own dbt project directory.
This is a top-level file and therefore should sit alongside your
Execute the following either through your CLI or from within dbt Cloud
dbt run --selector snowplow_mobile
This should take a couple of minutes to run.