# Integrating with Collibra

The Satori platform supports integration with Collibra. Collibra unites your entire organization with trusted data that's easy to find, understand, and access so you can do more with your data.

## The Satori Collibra Integration

The integration supports bi-directional synchronization of your Collibra objects (e.g. datasets, classifications) with Satori, enabling automation of provisioning access to data.

Once you create or update the Collibra integration, Satori synchronizes the integration periodically. You can also manually trigger the sync by clicking the **SYNC NOW** button in Satori.

## Setting up Collibra with Satori

To set up the Collibra integration in the Satori Management Console, perform the following steps:

1. Go to the Satori management console and select the **Settings** from the top right menu.
2. Now, select the **Integration** view and click on the **Collibra Integration** tile.
3. Enter the **Collibra Integration** name.
4. Enter the hostname, username and password.

> NOTE: The Satori Collibra integration is automatically set to **Active**. The integration can be manually deactivated from the Satori integration.
>
> NOTE: The **username** should have **read access** for all assets, responsibilities and attributes, as well as access to edit tags on the assets.

## Dataset Synchronization

The Satori Collibra integration enables you to sync the following:

1. Sync all of your datasets tagged with **Satori**  
2. Data Stewards with the **Satori Owner** role that are assigned to a specific dataset tagged with **Satori**  
3. When you **delete a dataset in Collibra** that you have synced to Satori, the dataset in Satori will remain.  
4. When you define a webhook in Satori, the webhook is triggered when changes are made to Dataset description, name or Satori Data steward (Owner).

> NOTE: The Collibra data stewards are synced only if they exist in the Satori system.  
>
> NOTE: If you delete the data steward in Collibra, the data steward remains assigned to the dataset in Satori.

### How to Mark a Collibra Dataset to Sync with Satori

Perform the following tasks to mark Collibra datasets:

1. Add a **SATORI** tag to each dataset that you want to synchronize with Satori.  
2. Create a new **Collibra Resource Role** called **Satori Owner**. See the [Create a resource role in Collibra](https://productresources.collibra.com/docs/collibra/latest/Content/DGCSettings/RolesAndPermissions/Roles/ResourceRoles/ta_create-resource-role.htm) to create a new resource role in Collibra.  
3. Go to each of your datasets and ensure that you have given your data stewards the **responsibility** of the **Satori Owner** role.

### Workflow Configuration

To automate provisioning of data access with Satori, add a script task that calls the Satori API to create a user access rule on the dataset. A simple workflow example is available [here](/content/docs/integrations/collibra/workflow.xml).

### Webhook Settings

Satori enables you to add customized actions to your Collibra integration. To add a webhook to your integration click the **Webhook Settings** tab and perform the following steps:

1. Enter the webhook URL.  
2. **Optional Header** - Add your own **Header Key and Value** enabling you to perform an authentication on your webhook.  
3. Click **SAVE**

> RECOMMENDATION: To create a secure webhook communication between Satori and the webhook, you must define a **header key** and a **header value** to authorize yourself when the webhook is triggered.
>
> NOTE: Satori ignores the outgoing webhook request response. Satori times out the request connection after 10 seconds.

#### Webhook Configuration

Satori sends a POST **request body** containing an **event type** and a **changed dataset list** to the webhook.

Each element in the **changed dataset list** contains a CREATE/UPDATE event type and matching ID sets in both Collibra and the **Synced** Satori Dataset.

```
{
    eventType: "COLLIBRA_SYNC_CHANGES",
    dataSets: [
        {
            eventType: "COLLIBRA_SYNC_DATA_SET_CREATE",
            externalId: "{collibra-dataset-id}"
            internalId: "{matching-satori-dataset-id}"
        },
        {
            eventType: "COLLIBRA_SYNC_DATA_SET_UPDATE",
            externalId: "{collibra-dataset-id}"
            internalId: "{matching-satori-dataset-id}"
        }
    ]
}
```

## Classification Synchronization

The integration enables you to bi-directionally sync data classifications and column assignments:

1. Select a Collibra database asset **(database/schema/table)** that you want to sync with Satori.  
2. The integration process searches for **table columns** that match the Satori inventory and then attempts to synchronize the column classifications between the systems.  
3. Classifications synchronized to Satori appear under the **Collibra Taxonomy**.  
4. Classifications synchronized to Collibra have the full Satori taxonomy starting with the `satori` keyword.

> NOTE: Once a classification is created, it is not to be deleted by the Satori and Collibra integration  
>
> NOTE: When a classification/location assignment is removed, the Collibra object representing the assignment (classification match) is changed to a "rejected state".

### How to Mark a Collibra Database Asset for Satori Synchronization

Perform the following tasks to mark a Collibra database asset for synchronization:

For each synchronized database object **(database/schema/table)** add the following tags:

- The `SATORI` tag which indicates a synchronized object  
- The `SATORI-DS-ID-<SATORI DATASTORE UUID>` tag which provides the metadata necessary for the synchronization process (e.g. SATORI-DS-ID-4eba2dd2-0954-41c3-a6d1-6c97f39a3293).
