# Fivetran

Follow the following steps to create a new **Account Viewer** user and generate their API key.

For more information and detailed instructions visit Fivetran official docs:

{% embed url="<https://fivetran.com/docs/rest-api/getting-started>" %}

* #### Step 1: Create a New User with Account Viewer Permissions

1. **Log in to Fivetran**\
   Go to the [Fivetran dashboard](https://fivetran.com/login) and log in with your administrator account.
2. **Navigate to User Management**
   * Click on **Account Settings** in the sidebar.
   * Select **Users** under the **Settings** section.
3. **Invite a New User**
   * Click the **Invite User** button and enter the user’s **email address**.
   * Assign the role **Account Viewer** from the available roles.
     * This role allows read-only access to view groups, destinations, and connectors but restricts editing.
4. **Send Invitation**
   * Click **Send Invitation**.
   * The invited user will receive an email with instructions to set up their account. Ensure they accept the invitation.

<figure><img src="https://3620459840-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnSbIoBjUxWTGNWa9gGw7%2Fuploads%2FKkLfZWDM4M1djTMqJWTe%2FScreenshot%202024-11-25%20at%2022.40.40.png?alt=media&#x26;token=cfa273a4-7858-4993-b0e4-3c0b304654fe" alt="" width="563"><figcaption><p>New User Form</p></figcaption></figure>

* #### Step 2: Generate an API Key for the User

  Once the user is created and their account is set up,\
  follow these steps to generate an API key for them:

1. **Log in as the User**
2. **Access API Key Settings**
   * Click on their **Account Name** at the bottom of the sidebar to open the account menu.
   * Select **API Key** from the dropdown options.
3. **Generate an API Key**
   * Click the **Generate New API Key** button.\
     **Note:** If an API Key already exists, use the existing credentials.
   * Copy both the **API Key** and **API Secret** to a secure location. These will only be shown once.
4. **Send Invitation**
   * Click **Send Invitation**.
   * The invited user will receive an email with instructions to set up their account. Ensure they accept the invitation.
5. Look for the **Account Name** circle at the bottom of the left-hand sidebar and click it.
6. From the menu that appears, select **API Key**.
7. If no API Key exists, click **Generate API Key** to create a new one.
   * **Note:** If an API Key already exists, use the existing credentials unless instructed otherwise.
8. Copy both the **API Key** and **API Secret** to a secure location. These will only be shown once.

<figure><img src="https://3620459840-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnSbIoBjUxWTGNWa9gGw7%2Fuploads%2FJ1Hq0l06T1TvxJ0uRN47%2Fscoped-keys-api-config.ce8fcecc.png?alt=media&#x26;token=22e722eb-4091-4229-ab28-92f9facf4606" alt="" width="563"><figcaption><p>API Key Section</p></figcaption></figure>

### Setting Up a Platform Connector in Fivetran

This section explains how to create a Fivetran platform connector with a Snowflake destination, configure it to monitor all account connectors, and grant the necessary permissions to access its data.

{% hint style="info" %}
This will help us monitor your connector runs and estimate costs. When setting up the Fivetran integration in our platform, enter the platform-connector's schema and database.

<img src="https://3620459840-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnSbIoBjUxWTGNWa9gGw7%2Fuploads%2FCWEj8dXGrzBijEArqQsI%2FScreenshot%202025-01-20%20at%2011.58.30.png?alt=media&#x26;token=3cf77154-9f46-46ec-a6c2-f4eeb196f691" alt="" data-size="original">
{% endhint %}

***

**Step 1: Create the Log Connector**

1. **Log in to Fivetran**: Access your Fivetran dashboard using your credentials.
2. **Navigate to Connectors**:
   * In the left-hand menu, click on **Connectors**.
   * Select **+ New Connector** to start the setup process.
3. **Choose the Log Connector**:
   * Search for or select **Log Connector** from the list of available connectors.
4. **Configure the Snowflake Destination**:
   * Select **Snowflake** as the destination.
   * Provide the connection details for your Snowflake instance, including:

     * **Account Name**
     * **Warehouse**
     * **Database**
     * **Schema**
     * **Role**

     or use an existing connection that already set up in your account.
   * Click **Test Connection** to ensure the connection is successful.
5. **Specify Connector Scope**:
   * Configure the connector to track **all account connectors**. This ensures logs from all connectors in the account are captured.
6. **Name the Connector**:
   * Set the connector's name to `FIVETRAN_LOG` for consistency and easy identification.
7. **Save and Start the Connector**:
   * Review your settings.
   * Click **Save & Test**.
   * Once verified, click **Start Connector** to begin syncing data.

#### Important: Granting Permissions for the `SEEMORE` User

To enable the `SEEMORE` user to access the Fivetran logs, execute the following SQL commands in your Snowflake environment. This will grant the necessary `USAGE` and `SELECT` permissions on the database, and schema where fivetran platform connector store the data.

```sql
-- 1) Allow the role to see the database
GRANT USAGE ON DATABASE your_database_name TO ROLE seemore_user_role;

-- 2) Allow the role to see the schema
GRANT USAGE ON SCHEMA your_database_name.your_schema_name TO ROLE seemore_user_role;

-- 3) Grant SELECT LOG & INCREMENTAL_MAR
GRANT SELECT ON TABLE your_database_name.your_schema_name.LOG TO ROLE seemore_user_role;
GRANT SELECT ON TABLE your_database_name.your_schema_name.INCREMENTAL_MAR TO ROLE seemore_user_role;
```

***
