> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifygtm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync data from Fivetran

> Learn how to connect upstream data sources to Unify via Fivetran.

## Overview

<Note>
  This guide assumes that you already have a Fivetran account. If you don't, you
  can sign up for a free plan [here](https://www.fivetran.com/).
</Note>

Unify provides a Fivetran destination which allows you to sync data from any
Fivetran data source into Unify objects. Fivetran supports a range of data
sources, including data warehouses, databases, and more.

## Connect Fivetran to Unify

<Steps titleSize="h3">
  <Step title="Select the Unify destination type">
    Within Fivetran, navigate to **Destinations** and select **Add a destination**.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-add-destination.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=2c8030f000e765d26da9584fb0e2285c" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-add-destination.png" />
    </Frame>

    Look for the **Unify** destination type and select it.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-unify-destination.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=cc89e4f8fd4838cf6e2ce84dd03cfbd1" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-unify-destination.png" />
    </Frame>
  </Step>

  <Step title="Configure the destination">
    Fill in a name for your destination and provide an API key. You can generate
    an API key within Unify by navigating to [Settings → API
    Keys](https://app.unifygtm.com/dashboard/settings/integrations/api-keys).

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-unify-destination-configuration.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=dd8568abba546afe3208d5d585170b0e" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-unify-destination-configuration.png" />
    </Frame>
  </Step>

  <Step title="Save the destination">
    Wait for the test to complete and then choose **Finish** to save the new
    destination.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-unify-destination-test.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=e058563e2452fb4d437754b1e51036f2" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-unify-destination-test.png" />
    </Frame>

    Once saved, you will see this destination listed in the **Destinations** tab.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-unify-destination-created.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=cc5191b48ae444842ef84eeeccbae9e5" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-unify-destination-created.png" />
    </Frame>
  </Step>
</Steps>

## Sync to an object

<Steps titleSize="h3">
  <Step title="Create a new sync">
    Within Fivetran, navigate to **Syncs** and select **Create a sync**.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-create-sync.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=1937a31235a21644a6e18bb7aa0dc469" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-create-sync.png" />
    </Frame>
  </Step>

  <Step title="Select a data source">
    Select the data source you want to sync from. This can be a table in a data
    warehouse, database, or any other supported data source.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-source.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=21f04281f3abbf4ccd5cd67a3a729643" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-source.png" />
    </Frame>
  </Step>

  <Step title="Select the Unify destination">
    Select the Unify destination you created previously.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-select-destination.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=d56ab71babcf13b1e0f51063fd024992" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-select-destination.png" />
    </Frame>
  </Step>

  <Step title="Determine the sync behavior">
    Choose the sync behavior. You can choose to either **Insert** or **Upsert**
    records into Unify. Inserting records will only add new records, while
    upserting will sync changes to existing records as well.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-select-behavior.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=3b733182dd754af880d47048d9e9fe3b" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-select-behavior.png" />
    </Frame>
  </Step>

  <Step title="Select the sync key">
    Choose which unique key to use for the sync. This is the key that will be
    used to identify records in Unify to avoid creating duplicates and to update
    existing records (if applicable).

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-select-key.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=996936c3c2fa1f61f032f81120afda58" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-select-key.png" />
    </Frame>
  </Step>

  <Step title="Map fields from source to object">
    Fill in the mapping between the fields in your data source and the
    attributes on the Unify object. This is how you tell Fivetran which fields
    in your data source should be synced to which attributes in Unify.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-map-fields.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=4f0ce329dce6ecdf66b8934a41d130c6" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-map-fields.png" />
    </Frame>

    In Unify, each object attribute has a value type which determines what kind
    of data it can hold. For example, **Text** attributes can hold any string
    value, while **Integer** and **Decimal** attributes can only hold numbers.
    You will only be able to map fields from your data source to attributes in
    Unify that support an equivalent value type.

    <Tip>
      One special value type is the **Reference** type, which is used to link to
      other objects. When mapping fields in Fivetran, you will see the unique
      attributes for each object that is referenced by the object you are
      syncing to.

      This allows you to link records in this object to other objects based on
      the data available in your data source, which is important in order to use
      the data in Unify. A common example is linking rows in a data warehouse
      table to company or person records in Unify so that they can be used for
      pesonalization or segmentation.
    </Tip>
  </Step>

  <Step title="Test sync">
    Click **Run test** to send a single record from your data source to the
    object in Unify.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-test.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=91f377dd0cf8259d490f86f64ee24159" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-test.png" />
    </Frame>
  </Step>

  <Step title="Confirm sync">
    Choose **Next** and verify the sync configuration. You can also choose to
    run the sync manually, on a trigger, or on a schedule.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-confirm.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=c114a374e36cf71d0ca5e26787366fe1" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-confirm.png" />
    </Frame>

    Once you are happy with the configuration, choose **Create** to save the
    sync. You will then be able to see it in the **Syncs** tab.

    <Frame>
      <img src="https://mintcdn.com/unify-19/or7oiwhUUaLcSwrc/images/developers/guides/import-data/fivetran/fivetran-sync-created.png?fit=max&auto=format&n=or7oiwhUUaLcSwrc&q=85&s=4a722224edf7e9dcf907619e2d107564" width="2304" height="1639" data-path="images/developers/guides/import-data/fivetran/fivetran-sync-created.png" />
    </Frame>
  </Step>
</Steps>
