> For the complete documentation index, see [llms.txt](https://documentation.immuta.com/saas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.immuta.com/saas/configuration/integrations/teradata/register-a-teradata-connection.md).

# Register a Teradata Connection

Register your Teradata data into Immuta

{% hint style="info" %}
**Public preview**: This integration is available to all accounts that request to enable it for their tenant. Contact your Immuta representative to enable it.
{% endhint %}

```mermaid
flowchart LR
    A[Create system user<br/> in Teradata]
    B[Register connection<br/>in Immuta]
    C[Run Immuta setup script<br/>in Teradata]

    A --> B --> C 
```

## Requirement <a href="#requirement" id="requirement"></a>

* Teradata VantageCloud or Teradata VantageCore

## Set up Teradata

**Required Teradata permissions**: To set up Teradata to connect to Immuta, your [**Teradata setup user**](#user-content-fn-1)[^1] must have the following permissions:

* `CREATE USER`
* [Access to the user `DBADMIN`](#user-content-fn-2)[^2]
* `CREATE DATABASE`

In Teradata, complete the following actions:

1. [Create a new user to serve as the **Immuta system account**](https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Database-Administration/Working-with-Users-Roles-and-Profiles-Operational-DBAs/Working-with-Database-Users/Creating-Users). Immuta will use this system account continuously to crawl the connection and apply policies.
2. ​[Grant the **Immuta system account** the required Teradata privileges](https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Database-Administration/Working-with-Users-Roles-and-Profiles-Operational-DBAs/Granting-Privileges-Directly-To-Users).

{% hint style="info" %}

#### Immuta system account permissions

The **Immuta system account user** must be granted the following necessary permissions.

* `SELECT` on the DBC database
* `CREATE ROLE`
* `DROP ROLE`
* `SELECT WITH GRANT OPTION` on all Teradata views and databases that Immuta should manage permissions to
* `CREATE VIEW WITH GRANT OPTION`
* `DROP VIEW WITH GRANT OPTION`

For descriptions and explanations of these privileges the system account needs for Immuta to enforce policies and maintain state in Teradata, see the [Teradata integration reference guide](https://documentation.immuta.com/saas/configuration/integrations/teradata/teradata-reference-guide.md#required-teradata-privileges).
{% endhint %}

## Register the connection

**Required Immuta permission**: `APPLICATION_ADMIN`

In Immuta,

1. Click <i class="fa-database">:database:</i> **Data** and select **Connections** in the navigation menu.
2. Click the **+ Add Connection** button.
3. Select the **Teradata** tile.
4. Enter the host connection information:
   1. **Display Name:** This is the name of your new connection. This name will be used in the API (`connectionKey`), in data source names from the host, and on the connections page. Avoid the use of periods (`.`) or [restricted words](#user-content-fn-3)[^3] in your connection name.
   2. **Hostname**: Your Teradata host (e.g., `your-host.env.teradata.com` ).
   3. **Port**: Port configured for Teradata.
   4. **SSL Mode**: Use the dropdown to select your SSL mode.
   5. **SSL Protocol**: Based on your SSL mode selection, also select the protocol.
5. Select the authentication method from the dropdown:

<details>

<summary><strong>Username and Password</strong></summary>

Enter the **username** and **password** of the **Immuta system account user**. This is the [Teradata user you created above](#set-up-teradata).

</details>

<details>

<summary><strong>LDAP</strong></summary>

Enter the **username** and **password** of the **Immuta system account user**. This is the [Teradata user you created above](#set-up-teradata).

</details>

<details>

<summary><strong>OAuth</strong></summary>

Enter the authentication details of the **Immuta system account user**. This is the [Teradata user you created above](#set-up-teradata).

1. Fill out the **Client ID**, which is the subject of the generated token. It is also known as `sub` (subject).
2. Fill out the **Client Secret**.
3. Fill out the **Authority URL** of your identity provider.
4. Enter the **Scope** to limit the operations and roles allowed in Teradata by the access token. See the [OAuth 2.0 documentation](https://oauth.net/2/scope/) for details about scopes.

</details>

6. Click **Next**.
   1. Opt to **Enable Object Sync**, which will keep your connection objects up to date with your Teradata environment.
      1. Select the **Start Time** for when the first object sync job will run each day.
      2. Select the **Run Frequency** to determine how frequently object sync will run each day.
      3. Opt to **Run Object Sync on Create** to create all the data objects for your connection. If you do not select this option, you must run object sync manually or wait for the scheduled object sync for your connection's data objects.
7. Click **Save connection**.

## Run the setup script

**Required Teradata permissions**: To run the setup script in Teradata, the **Teradata setup user** must have the following permissions:

* `CREATE USER`
* Access to the user `DBADMIN`
* `CREATE DATABASE`

To run the Teradata connection setup script,

1. In Immuta, copy the provided script.
2. In Teradata, run the script.&#x20;
3. In Immuta, click **Validate Connection** and if the connection is successful, click **Finish**. If there are any errors, check the connection details and credentials to ensure they are correct and try again.

{% hint style="info" %}
Teradata does not allow granting `WITH GRANT OPTION` to a role. To ensure all Immuta policies work as expected, the grants within the script to `PUBLIC` on the Immuta tables are required.
{% endhint %}

## Grant the `immuta_views` database access

After you register the connection and the `immuta_views` database is created, you must grant that database the ability to select from the databases that have your tables and views:

```sql
GRANT SELECT ON base_table_database TO immuta_views WITH GRANT OPTION;
GRANT SELECT ON view_database TO immuta_views WITH GRANT OPTION;
```

[^1]: The Teradata user setting up the connection in Immuta and running the script in Teradata.

[^2]: This permission will be necessary when [running the script](#run-the-setup-script).

[^3]: Your display name cannot be any of the following words: `data`, `connection`, `object`, `crawl`, `search`, `settings`, `metadata`, `permission`, `sync`, `bulk`, and `upgrade`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.immuta.com/saas/configuration/integrations/teradata/register-a-teradata-connection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
