Support for Teradata connector (Technical Preview)

Cloudera Data Warehouse offers support for a read-only Trino-Teradata connector designed to facilitate SELECT operations on Teradata sources. It operates strictly in ANSI Mode, optimizing performance by pushing down filters and aggregates directly to the source database.

Key features and capabilities

Supported Data Type
The connector includes comprehensive type mappings for:
  • Numeric: TINYINT, SMALLINT, INTEGER, BIGINT, REAL, DOUBLE, DECIMAL(p, s)
  • String: CHAR, VARCHAR (bounded and unbounded)
  • Date/Time: DATE, TIMESTAMP (with or without Time Zone, precision up to 6)

Constraints related to TIMESTAMP data type

The core problem is the inability of the traditional TIMESTAMP data type to store time zone information, a limitation found in both databases and the legacy java.sql.Timestamp class. While modern Java introduces classes like OffsetDateTime and ZonedDateTime to handle time zones, the official JDBC 4.2 specification still relies on the older java.sql.Timestamp. Teradata attempts to support the modern OffsetDateTime through its driver's setObject method, but this implementation has issues, as it internally reverts to legacy java.sql.Timestamp and Calendar conversions, reintroducing the original time zone issues.

Workaround: The newer SQL standard introducing the TIMESTAMP WITH TIME ZONE data type is supported by many vendors, including Trino and Teradata. The primary goal of this type is to ensure that constant literals and prepared statements retain their associated time zone upon insertion, making the database immune to changes in system or JVM default time zone settings. This functionality is essential for cross-region deployments, guaranteeing that data can be accurately queried and client applications can perform reliable time zone translations based on the captured time zone.

Query Optimization
To balance performance with Teradata's architectural constraints, pushdown logic is applied selectively:
  • Fully Pushed Down:
    • Numeric, Date, and Time predicates.
    • Basic aggregates: count(), min(), max(), sum(), and avg().
  • Not Pushed Down:
    • Character-based inequalities.
System Features
  • Connection Management: Features integrated JDBC connection pooling.
  • Metadata Caching: Configurable caching for schemas and tables to reduce overhead.
  • Naming Conventions: Enforces case-insensitive name matching for schemas and tables, complying with Teradata’s native uniqueness constraints.
Limitations and Unsupported Operations
This connector is strictly read-only. Attempting any of the following will trigger a NOT_SUPPORTED exception:
  • DML Operations: INSERT, UPDATE, DELETE
  • DDL Operations: DROP, TRUNCATE, RENAME