Skip to content

Conversation

sc250072
Copy link

@sc250072 sc250072 commented Sep 28, 2025

Description

This PR introduces the Teradata connector, enabling Trino to query and interact with Teradata data sources.

Key additions:

Implements the Teradata connector SPI with support for:
• Connection setup
• Schema retrieval
• Data type mapping

Adds integration tests against a Teradata ClearScape Analytics™ Experience instance to verify connection, query execution, and result mapping.
Updates documentation under connectors to include usage examples and configuration options.
This connector extends Trino’s ecosystem to support Teradata users, allowing them to leverage Trino’s distributed query engine for federated queries.

Additional context and related issues

The Teradata connector module has both unit tests and integration tests.
The integration tests require access to a Teradata ClearScape Analytics™ Experience.
You can follow the steps below to run the integration tests locally.

A new PR has been created for the Teradata connector to replace PR #26574
, with a reduced scope based on the recommendation in this review comment
. Additional review comments from the earlier PR have also been addressed.

Prerequisites

  1. Create a new ClearScape Analytics™ Experience account

    If you don't already have one, sign up at:

    Teradata ClearScape Analytics™ Experience

  2. Login

    Sign in with your new account at:

    ClearScape Analytics™ Experience Login

  3. Collect the API Token

    Use the Copy API Token button in the UI to retrieve your token.

  4. Define the following environment variables

    ⚠️ Note: The Teradata database password must be at least 8 characters long.

    export CLEARSCAPE_TOKEN=<API Token>
    export CLEARSCAPE_PASSWORD=<Password for Teradata database (min 8 chars)>
    export CLEARSCAPE_REGION=us-central;
    

Running Integration Tests

Once the environment variables are set, run the integration tests with:

⚠️ Note: Run the following command from the Trino parent directory.

./mvnw clean install -pl :trino-teradata

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
(x ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Connectors
* Add Teradata connector. ({issue}`<issue-number-if-any>`)

@ebyhr ebyhr self-requested a review September 30, 2025 22:46

import java.util.List;

public record EnvironmentResponse(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a compact constructor and add rnn check

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as others

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

boolean destroyEnv,
String region)
{
this.token = token;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rnn check

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requirednotnull check added

public static final String BEARER = "Bearer ";

private Headers()
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

private Headers()
{}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed


@AfterAll
public void cleanupTestDatabase()
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use closeAfterClass

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated with closeAfterClass

@Test
public void testAddColumn()
{
Assumptions.abort("Skipping as connector does not support column level write operations");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static import

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same other places

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed all applicable places

Copy link
Author

@sc250072 sc250072 Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @chenjian2664 for your review. addressed all your review comments.


<dependency>
<groupId>com.teradata.jdbc</groupId>
<artifactId>terajdbc</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maven central lists this with "Teradata Generic Download License" license.
Is that license compatible for inclusion in Apache project?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @findepi, Thanks for pointing this out. The Teradata JDBC driver is distributed under the "Teradata Generic Download License" and is free to download and use.

We are currently using the same driver in the Airbyte project for the Teradata connector without issues.

That said, we are checking internally with our legal team to confirm whether this license is compatible for inclusion in Apache projects like Trino. We’ll get back to you as soon as we have a confirmation.

@findepi
Copy link
Member

findepi commented Oct 6, 2025

The Teradata connector module has both unit tests and integration tests.
The integration tests require access to a Teradata ClearScape Analytics™ Experience.

How will these tests be run on Trino CI?

@sc250072
Copy link
Author

sc250072 commented Oct 8, 2025

The Teradata connector module has both unit tests and integration tests.
The integration tests require access to a Teradata ClearScape Analytics™ Experience.

How will these tests be run on Trino CI?

Thank you @findepi for your review. We need Trino team help to configure required environment variables to run Teradata connector integration tests and need to update Trino CI to include Teradata integration tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants