# Configure the Normalize data model
> Configure the Normalize dbt package for flattening and unnesting self-describing events and entities into dedicated tables.
> Source: https://docs.snowplow.io/docs/modeling-your-data/modeling-your-data-with-dbt/dbt-configuration/normalize/
> Documentation index: https://docs.snowplow.io/llms.txt

This page helps you configure the Snowplow Normalize dbt package. You can customize variables, generate configuration code, and set output schemas.

## Package configuration variables (v1.0.0)

This package utilizes a set of variables that are configured to recommended values for optimal performance of the models. Depending on your use case, you might want to override these values by adding to your `dbt_project.yml` file.

> **Note: Variable name prefix**
>
> All variables in Snowplow packages start with `snowplow__` but we have removed these in the below tables for brevity.

### Warehouse and tracker

| Variable | Description | Default |
| --- | --- | --- |
| `database` | The database that contains your atomic events table. | `target.database` |
| `atomic_schema` | The schema (dataset for BigQuery) that contains your atomic events table. | `atomic` |
| `dev_target_name` | The [target name](https://docs.getdbt.com/docs/core/connect-data-platform/profiles.yml) of your development environment as defined in your `profiles.yml` file. See the [Manifest Tables](/docs/modeling-your-data/modeling-your-data-with-dbt/package-mechanics/manifest-tables/) section for more details. | `dev` |
| `grant_schema_usage` | Enables granting usage on schemas interacted with on a dbt run | `true` |
| `grant_select_to` | A list of users to grant select to all tables created by this package to. | `[]` |
| `events` | This is used internally by the packages to reference your events table based on other variable values and should not be changed. | `events` |

### Operation and logic

| Variable | Description | Default |
| --- | --- | --- |
| `start_date` | The date to start processing events from in the package on first run or a full refresh, based on `collector_tstamp` | `2020-01-01` |
| `allow_refresh` | Used as the default value to return from the `allow_refresh()` macro. This macro determines whether the manifest tables can be refreshed or not, depending on your environment. See the [Manifest Tables](/docs/modeling-your-data/modeling-your-data-with-dbt/package-mechanics/manifest-tables/) section for more details. | `false` |
| `backfill_limit_days` | The maximum numbers of days of new data to be processed since the latest event processed. Please refer to the [incremental logic](/docs/modeling-your-data/modeling-your-data-with-dbt/package-mechanics/incremental-processing/#package-state) section for more details. | `30` |
| `days_late_allowed` | The maximum allowed number of days between the event creation and it being sent to the collector. Exists to reduce lengthy table scans that can occur as a result of late arriving data. | `3` |
| `lookback_window_hours` | The number of hours to look before the latest event processed - to account for late arriving data, which comes out of order. | `6` |
| `session_timestamp` | This determines which timestamp is used to process sessions of data. It's a good idea to have this timestamp be the same timestamp as the field you partition your events table on. | `collector_tstamp` |
| `partition_tstamp` | This determines which timestamp is used to partition the derived tables. You need to make sure that this timestamp will be present in the flattened events table. | `collector_tstamp` |
| `upsert_lookback_days` | Number of days to look back over the incremental derived tables during the upsert. Where performance is not a concern, should be set to as long a value as possible. Having too short a period can result in duplicates. Please see the [Snowplow Optimized Materialization](/docs/modeling-your-data/modeling-your-data-with-dbt/package-mechanics/optimized-upserts/) section for more details. | `30` |
| `license_accepted` | Use this field to accept the Snowplow Personal and Academic License or specify that you have a commercial agreement with Snowplow. | `false` |

### Entities (contexts), filters, and logs

| Variable | Description | Default |
| --- | --- | --- |
| `app_id` | A list of `app_id`s to filter the events table on for processing within the package. | `[ ] (no filter applied)` |

### Warehouse-specific

| Variable | Description | Default | Warehouse |
| --- | --- | --- | --- |
| `databricks_catalog` | The catalogue your atomic events table is in. Depending on the use case it should either be the catalog (for Unity Catalog users from databricks connector 1.1.1 onwards, defaulted to `hive_metastore`) or the same value as your `snowplow__atomic_schema` (unless changed it should be 'atomic'). | `hive_metastore` | Databricks |
| `derived_tstamp_partitioned` | Boolean to enable filtering the events table on `derived_tstamp` in addition to `collector_tstamp`. | `true` | Bigquery |

