# Preliminary setup

## Synchronization strategies

When connecting a data warehouse to mediarithmics, you will need to configure a service account with specific rights on the data you want to expose. The service account will need to at least have read access on the data.

#### Working schema

If you want to use synchronization strategies that can handle updates and deletes on existing data, you will need to create a **working schema**. On this working schema, the service account should have editing rights : this will be used to create temporary tables and track changes on your tables. See [Access management](#access-management) for more details on how to configure service accounts, and how to create a working schema.

#### Available strategies

* **Profile data**
  * *Timestamp based* : all updates in the source table (insert, update, delete) are impacted in mediarithmics. This requires a timestamp column tracking the last update of each line of the table.
  * *Hash table* : all updates in the source table (insert, update, delete) are impacted in mediarithmics. A temporary table is created based on a hash of columns of the source table.&#x20;
  * *Full import* : every synchronization will import the full table. It does not handle deletes or updates, this is a append-only strategy.
* **Event data**&#x20;
  * *Timestamp based* : import all events that occurred since the last import. This requires a timestamp column tracking when each event of the table has occurred. It does not handle deletes or updates, this is a append-only strategy.

{% hint style="info" %}
At the time of the synchronization, if the source table for events contains data that will be impacted by active [cleaning rules](/advanced-usages/data-privacy-compliance/cleaning-rules.md) on events for the datamart, then these events will not be imported.&#x20;
{% endhint %}

#### Summary

Without a working schema only append-only strategies are available : timestamp based for event data, and full import for profile data.

<table><thead><tr><th width="347.33331298828125">Strategy</th><th width="474.666748046875">Needs a working schema</th></tr></thead><tbody><tr><td><strong>Timestamp based</strong></td><td>Events : No<br>Profile : Yes</td></tr><tr><td><strong>Full import</strong></td><td>No</td></tr><tr><td><strong>Hash table</strong></td><td>Yes</td></tr></tbody></table>

## Access management&#x20;

To set up a connection to a data warehouse you will need to follow specific steps based on your provider :

* [BigQuery](/data-streams/data-warehouse/preliminary-setup/bigquery.md)
* [Snowflake](/data-streams/data-warehouse/preliminary-setup/snowflake.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.mediarithmics.io/data-streams/data-warehouse/preliminary-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
