# 5. Create a sync

Now that you have created a connection for your endpoint, you can create a sync.

1. Go to 'New Sync' to begin.\
   Creating a sync is a four step process with sub-steps depending on your selections.
2. Select your target app from the list of installed plugins.
3. Select the connection that you configured previously.
4. Choose the sync direction.\
   Omnata can sync data both Inbound to Snowflake and Outbound from Snowflake, but a sync only operates in one direction.
5. Configure the source.

**For inbound syncs:** the source will be objects in the connected app or database.\
You will select the objects to sync from the list.

**For outbound syncs:** the source will be Snowflake tables and views. You must grant the Omnata app access to source table(s).

Use the following commands to grant access to a source table:

```sql
grant usage on database <database_name> to application {app_database};
grant usage on schema <database_name>.<schema_name> to application {app_database};
grant select on table <database_name>.<schema_name>.<table_name> to application {app_database};
```

You will need the MANAGE\_GRANTS privilege to run these commands. If you do not have this privilege, you can:

* Have an ACCOUNTADMIN to grant you access to the table(s).
* Have an ACCOUNTADMIN grant you the MANAGE\_GRANTS privilege.

6. Configure the sync.\
   This is where you choose the sync behaviour. The exact behaviours that are supported are determined by the plugin. See [Inbound Sync Strategies](/omnata-product-documentation/omnata-sync-for-snowflake/how-it-works/sync-directions-and-strategies/inbound.md#inbound-sync-strategies)\
   **For inbound syncs,** you will set how the selected objects are stored in the destination Snowflake table. Once the sync is running, inbound data is stored in the application database OMNATA\_SYNC\_ENGINE. The schemas INBOUND\_RAW and INBOUND\_NORMALIZED will contain raw and normalized data, respectively. There is a table for each stream (object) with the naming convention \<sync-name>\_main>. See [Inbound Storage Location](/omnata-product-documentation/omnata-sync-for-snowflake/how-it-works/sync-directions-and-strategies/inbound.md#inbound-storage-location).\
   **For outbound syncs,** you will create a mapping between your Snowflake table and the fields in the target app. See [Outbound Sync Strategies](/omnata-product-documentation/omnata-sync-for-snowflake/how-it-works/sync-directions-and-strategies/outbound.md#outbound-strategies) and the section for each supported [application](/omnata-product-documentation/omnata-sync-for-snowflake/apps.md).
7. Deploy the sync.\
   Set the schedule to run the sync on or make the sync depend on another sync.\
   To deploy with dbt, read [dbt](/omnata-product-documentation/omnata-sync-for-snowflake/integrations/dbt.md).
8. Hit 'Start sync' and it will save the configuration and run at the next scheduled time. You can trigger a run immediately on the Sync page > Status tab.


---

# 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://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/step-by-step-guides/5.-create-a-sync.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.
