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
TIMESTAMPdata type to store time zone information, a limitation found in both databases and the legacyjava.sql.Timestampclass. While modern Java introduces classes likeOffsetDateTimeandZonedDateTimeto handle time zones, the official JDBC 4.2 specification still relies on the olderjava.sql.Timestamp. Teradata attempts to support the modernOffsetDateTimethrough its driver'ssetObjectmethod, but this implementation has issues, as it internally reverts to legacyjava.sql.Timestampand Calendar conversions, reintroducing the original time zone issues.Workaround: The newer SQL standard introducing the
TIMESTAMP WITH TIME ZONEdata 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. - Numeric:
- 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(),andavg().
- Not Pushed Down:
- Character-based inequalities.
- Fully Pushed Down:
- 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_SUPPORTEDexception:- DML Operations:
INSERT, UPDATE, DELETE - DDL Operations:
DROP, TRUNCATE, RENAME
- DML Operations:
