Starburst Netezza connector#

The Starburst Netezza connector allows querying and creating tables in an external IBM Netezza Database.

Requirements#

To connect to Netezza, you need:

  • Netezza version 11.2.0.0 or higher.

  • Network access from the coordinator and workers to the Netezza Server. Port 5480 is the default port.

  • Netezza JDBC driver, downloaded from IBM Fix Central.

  • A valid Starburst Enterprise license.

Configuration#

You need to add the JDBC driver, before creating catalogs:

  1. Obtain the Netezza JDBC driver.

  2. Add the JDBC JAR file to the SEP plugin/netezza directory on the coordinator and all workers.

  3. Restart SEP on every node.

Create a catalog properties file in etc/catalog named, for example, mynetezza.properties to access the configured Netezza database in the mynetezza catalog. Configure the usage of the connector by specifying the name netezza and replace the connection properties as appropriate for your setup.

connector.name=netezza
connection-url=jdbc:netezza://example.net:5480/database
connection-user=admin
connection-password=secret

More information about the supported JDBC URL format and parameters of the Netezza JDBC driver is available in the Netezza documentation.

General configuration properties#

The following table describes general catalog configuration properties for the connector:

Property name

Description

Default value

case-insensitive-name-matching

Support case insensitive schema and table names.

false

case-insensitive-name-matching.cache-ttl

1m

case-insensitive-name-matching.config-file

Path to a name mapping configuration file in JSON format that allows Trino to disambiguate between schemas and tables with similar names in different cases.

null

case-insensitive-name-matching.refresh-period

Frequency with which Trino checks the name matching configuration file for changes.

0 (refresh disabled)

metadata.cache-ttl

Duration for which metadata, including table and column statistics, is cached.

0 (caching disabled)

metadata.cache-missing

Cache the fact that metadata, including table and column statistics, is not available

false

metadata.cache-maximum-size

Maximum number of objects stored in the metadata cache

10000

write.batch-size

Maximum number of statements in a batched execution. Do not change this setting from the default. Non-default values may negatively impact performance.

1000

join-pushdown.enabled

Enable join pushdown. Equivalent catalog session property is join_pushdown_enabled. Enabling this may negatively impact performance for some queries.

false

Type mapping#

Because SEP and Netezza each support types that the other does not, this connector modifies some types when reading or writing data.

Netezza to SEP read type mapping#

The following read type mapping applies when data is read from existing tables in Netezza, or inserted into existing tables in Netezza from SEP.

Netezza to SEP read type mapping#

Netezza type

SEP type

Notes

BOOLEAN, BOOL

BOOLEAN

BYTEINT, INT1

TINYINT

SMALLINT, INT2

SMALLINT

INTEGER, INT, INT4

INTEGER

BIGINT, INT8

BIGINT

DOUBLE PRECISION

DOUBLE

REAL, FLOAT(p)

REAL

Special values Infinity, -Infinity, and NaN are supported.

NUMERIC,(p, s), NUMERIC(p), NUMERIC, DECIMAL(p, s)

DECIMAL(p, s)

CHARACTER(n), CHAR(n), NCHAR(n)

CHAR(n)

CHARACTER VARYING(n), VARCHAR(n), NVARCHAR(n)

VARCHAR(n)

VARBINARY(n)

VARBINARY

ST_GEOMETRY(n) is not supported.

DATE

DATE

TIME

TIME(6)

TIME WITH TIME ZONE

TIME(6) WITH TIME ZONE

TIMESTAMP

TIMESTAMP(6)

JSON, JSONB

JSON

No other types are supported.

SQL support#

The connector provides read and write access to data and metadata in the Netezza database. In addition to the globally available and read operation statements, the connector supports the following features:

SQL DELETE#

If a WHERE clause is specified, the DELETE operation only works if the predicate in the clause can be fully pushed down to the data source.

SEP to Netezza write type mapping#

The following write type mapping applies when tables are created in Netezza from SEP.

SEP to Netezza write type mapping#

SEP type

Netezza type

Notes

BOOLEAN

BOOLEAN

TINYINT

BYTEINT

SMALLINT

SMALLINT

INTEGER

INTEGER

BIGINT

BIGINT

REAL

REAL

DOUBLE

DOUBLE PRECISION

DECIMAL(p, s)

DECIMAL(p, s)

CHAR(n)

NCHAR(n)

max n is 16,000

VARCHAR

NVARCHAR(n)

max n is 16,000

VARBINARY

VARBINARY(64000)

DATE

DATE

TIME, TIME(p)

TIME

max supported precision is 6

TIME WITH TIME ZONE, TIME(p) WITH TIME ZONE

TIME WITH TIME ZONE

max supported precision is 6

TIMESTAMP, TIMESTAMP(p)

TIMESTAMP

max supported precision is 6, TIMESTAMP WITH TIME ZONE is not supported

JSON

JSONB

No other type is supported.

General configuration properties#

The following properties can be used to configure how data types from the connected data source are mapped to Trino data types and how the metadata is cached in Trino.

Property name

Description

Default value

unsupported-type-handling

Configure how unsupported column data types are handled:

  • IGNORE, column is not accessible.

  • CONVERT_TO_VARCHAR, column is converted to unbounded VARCHAR.

The respective catalog session property is unsupported_type_handling.

IGNORE

jdbc-types-mapped-to-varchar

Allow forced mapping of comma separated lists of data types to convert to unbounded VARCHAR

Performance#

The connector includes a number of performance improvements, detailed in the following sections.

Table statistics#

The Netezza connector supports table and column statistics to improve query processing performance based on the actual data in the data source.

The statistics are collected by Netezza and retrieved by the connector. Read more in Netezza documentation.

Pushdown#

The connector supports pushdown for a number of operations:

Aggregate pushdown for the following functions:

Dynamic filtering#

Dynamic filtering is enabled by default. It causes the connector to wait for dynamic filtering to complete before starting a JDBC query.

You can disable dynamic filtering by setting the property dynamic-filtering.enabled in your catalog properties file to false.

Security#

The connector includes a number of security-related features, detailed in the following sections.

Kerberos authentication#

The connector supports Kerberos authentication. Use the following properties in the catalog properties file to configure it.

netezza.authentication.type=KERBEROS
kerberos.client.principal=example@example.com
kerberos.client.keytab=etc/kerberos/example.keytab
kerberos.config=etc/kerberos/krb5.conf

In this example the user example@example.com, as defined in the kerberos.client.principal property, is used to connect to the database. The related Kerberos service ticket is located in the file defined in the kerberos.client.keytab property.

Kerberos credential pass-through#

The connector can be configured to pass through Kerberos credentials, received by SEP, to the Netezza database. This allows you to apply Kerberos-defined permissions to Netezza connections through SEP.

To configure credential pass-through in Kerberos and SEP, see Kerberos credential pass-through.

After you configure Kerberos and SEP, edit the catalog properties file to enable the connector to pass the credentials to the Netezza database. Configure the following Kerberos client configuration properties in the catalog properties file:

netezza.authentication.type=KERBEROS_PASS_THROUGH
http.authentication.krb5.config=/etc/krb5.conf
http-server.authentication.krb5.service-name=exampleServiceName
http-server.authentication.krb5.keytab=/path/to/Keytab/File

Any Netezza database accessed using SEP is now subject to the Kerberos-defined data access restrictions and permissions.

Password credential pass-through#

The connector supports password credential pass-through. To enable it, edit the catalog properties file to include the authentication type:

netezza.authentication.type=PASSWORD_PASS_THROUGH

For more information about configurations and limitations, see Password credential pass-through.

User impersonation#

The Netezza connector supports user impersonation.

User impersonation can be enabled in the catalog properties file:

netezza.impersonation.enabled=true

User impersonation in the connector is based on Netezza’s masquerading feature, which uses the EXECUTE AS command. For more information, see Netezza masquerading.