Teradata QueryGrid: Teradata Database-to-Presto documentation

Introduction

Teradata® QueryGrid™: Teradata Database-to-Presto (henceforth known as “T2P”) provides a SQL interface to query Presto from the Teradata Database. Presto is a SQL query engine for big data that provides access to many data sources, including Hadoop ecosystem databases like Hive and traditional relational databases like MySQL and PostgreSQL.

You can issue queries from Teradata with T2P that do the following:

  • Import data from Presto tables into an existing table in the Teradata Database.
  • Export data from Teradata and store it in Hadoop or one of the databases that Presto has a connector for.
  • Select data from Presto tables and join it with existing Teradata data.

Prerequisites

T2P is compatible with versions of the Teradata database in the 15.00 and 15.10 releases. The minimum version for the 15.00 release is 15.00.04.02. The minimum version for the 15.10 release is 15.10.01.01. The Teradata database must have Java 8 installed. Additionally, there are recommended changes to the Teradata JVM properties that greatly improve performance, as described here: JVM Configuration. Changing the JVM properties on the Teradata database requires a restart of the JVM in Teradata.

Only Presto version 0.167-t is supported with this version of T2P.

These installation instructions use the presto-admin utility, described here. The administrator needs sudo and ssh access to all of the Presto nodes to install a new connector with presto-admin.

The following ports must be opened on the Teradata and Presto nodes:
  • The Presto coordinator port (DB_PORT) and TRANSPORT_COORDINATOR_PORT (by default 21337) on the coordinator for all Teradata nodes.
  • The TRANSPORT_COORDINATOR_PORT (by default 21337) on all the Presto coordinator and workers for all Teradata nodes.
  • data-exchange.server.port (by default 21337) on all the Teradata nodes for all Presto coordinator and workers.

Note: We assume that the Presto coordinator and workers can connect to each other on TRANSPORT_COORDINATOR_PORT (by default 21337).

Compatibility Matrix

Each version of T2P works with exactly one version of Presto. See the table below for the mapping:

Presto version Teradata-to-Presto QueryGrid version
0.127t 0.2
0.141-t 0.3
0.148-t 1.2
0.152-t 1.3
0.157-t 1.4
0.167-t 1.5

Installation

To install T2P, you must install a connector on Presto and a driver on Teradata. To be able to run queries, you must create one or more T2P foreign servers on Teradata.

Before starting installation, upload teradata-to-presto-driver.zip to both the Presto and Teradata clusters and unzip it:

unzip teradata-to-presto-driver.zip -d teradata-to-presto-driver
cd teradata-to-presto-driver
The archive contains the following:
  • the Teradata driver jar file, teradata-to-presto-driver.jar
  • the RPM file to be installed on the Presto cluster, teradata-to-presto-connector-*.noarch.rpm
  • the sample properties files to be copied to the Presto cluster, properties/querygrid.properties
  • the install script for the driver on Teradata, install_teradata
  • a utility script to restart the JVM on Teradata, restart_jvm.bteq
  • this documentation, in the docs directory

Installation on Presto

First, install a connector on Presto. These instructions use the presto-admin tool for easier management of Presto.

In order to install T2P on Presto:

  1. Install the teradata-to-presto-connector RPM:

    ./presto-admin package install teradata-to-presto-connector-*.noarch.rpm
    
  2. Copy properties/querygrid.properties from the package zip file to ~/.prestoadmin/catalog.

  3. In ~/.prestoadmin/catalog/querygrid.properties, replace <PRESTO-HOST> with the actual Presto coordinator hostname or IP reachable by Teradata. If bynet is configured, make sure to use the bynet IP or a hostname that resolves to the bynet IP so that network traffic uses the fastest possible connection.

  4. Deploy the T2P connector configuration using presto-admin:

    ./presto-admin catalog add querygrid
    
  5. Restart Presto:

    ./presto-admin server restart
    
  6. Use the Presto CLI to ensure that the T2P connector is installed:

./presto --server localhost:8080 --catalog system --schema default
presto:default> show catalogs;
  Catalog
-----------
 ...
 querygrid
 ...

Note

If running the CLI on any node but the Presto coordinator, substitute the Presto coordinator hostname/IP for “localhost” in the above command.

Installation on Teradata

install-teradata script

All management of T2P on the Teradata side happens via the install-teradata script.

The installation script contain four commands:
  • install - installs the T2P driver jar
  • uninstall - uninstalls the T2P driver jar
  • create_teradata_to_presto_server - creates a T2P foreign server
  • create_kerberized_teradata_to_presto_server - creates a T2P foreign server that connects via Kerberos
  • drop_server - drops a foreign server

To see a full list of supported options, type the following:

./install-teradata

Privileges and Security

T2P uses two Teradata accounts: a DBA user and a user that will run queries on the foreign server.

The DBA user (henceforth known as dba_user) is usually sysdba or a user with similar permissions, and it installs the driver in the syslib database.

The following permissions are granted to dba_user during the install task:

GRANT EXECUTE PROCEDURE ON sqlj TO dba_user;
GRANT CREATE EXTERNAL PROCEDURE ON syslib TO dba_user WITH GRANT OPTION;
GRANT CREATE FUNCTION ON syslib TO dba_user;
GRANT CREATE SERVER ON td_server_db TO dba_user;
GRANT DROP SERVER ON td_server_db TO dba_user;

The user that will be running queries (henceforth known as presto_user) can either be an existing user or a new user. That user must have sufficient spool space for the query workload: the spool space must be at least as large as the amount of data being fetched from Presto.

The following permissions are granted to presto_user during the install task:

GRANT CREATE SERVER ON td_server_db TO presto_user;
GRANT DROP SERVER ON td_server_db TO presto_user;

In addition, SELECT and EXECUTE FUNCTION privileges for the import and export functions for the foreign server are granted to presto_user.

JVM Configuration

T2P requires additional Java Virtual Machine (JVM) options. For best performance, it is recommended to use the Java G1 garbage collector and increase the JVM heap size to 30GB using cufconfig.

Warning

cufconfig -f overwrites the existing JVM properties. To list the existing properties, run cufconfig -o.

Warning

If on a VM or other low-memory environment, you will need to set -Xms and -Xmx to a value no larger than the amount of free memory.

In order to set these JVM options, run the following commands on any Teradata node:

cufconfig -o | grep JVMOptions > old_jvmoptions.txt
echo "JVMOptions: -Xms30g -Xmx30g -XX:+UseG1GC -XX:G1HeapRegionSize=32M -XX:+ExplicitGCInvokesConcurrent -XX:OnOutOfMemoryError=kill -9 %p" > /tmp/jre_config;
cufconfig -f /tmp/jre_config;

Then, restart the JVM for the Teradata Database using the restart_jvm.bteq script as dba_user:

.run file restart_jvm.bteq

Driver Installation

To install T2P, you need the following information:
  • dba_logon - Teradata’s database admin credentials
  • user_logon - Teradata’s database credentials of the existing user who will use T2P.
  • Transport Coordinator IP - IP address or hostname of the Presto coordinator, accessible from the Teradata hosts; must match host provided in the data-exchange.coordinator.host-and-port property in the Presto configuration
  • Transport Coordinator Port - Port used for data exchange on Presto coordinator, accessible from the Teradata hosts; must match port number provided in data-exchange.server.port property in the Presto configuration

You can install the driver with the following command:

./install-teradata install \
                   --dba_logon dba_login,dba_password \
                   --user_logon user_login,user_password

Note

All values used in command examples must be replaced with values corresponding to your environment.

./install-teradata install performs the following tasks:
  • Registers the driver jar file in the Teradata database.
  • Grants proper rights to the user (in order to be able to use T2P), which are listed in full in the Privileges and Security section.
  • Registers import and export functions (needed to create Teradata T2P foreign servers).

Note

It is not possible to call install-teradata twice, and only dba_logon and user_logon will have permission to create foreign servers. However, you may grant permissions on the foreign servers to different users.

Foreign Server Creation

Once the driver is installed, create one or more foreign servers to be able to query data from Presto.

To create a foreign server issue the following command:

./install-teradata create_teradata_to_presto_server \
                   --user_logon user_login,user_password \
                   --presto_master_ip <presto_ip> \
                   --server_name presto_server \
                   [--presto_master_port <presto_port>] \
                   [--server_catalog <presto_catalog_to_query>] \
                   [--server_schema default]

The options --presto_master_port, --server_catalog, and --server_schema are optional. By default, --presto_master_port is 8080 and --server_catalog is hive. If you want to query one particular schema, you can specify it via --server_schema, otherwise you will need to specify it explicitly for each query. Be aware that when the schema is already specified in the foreign server, you won’t be able to specify any other schema explicitly.

It is possible to create multiple foreign servers with different configurations, as long as they have different names. For additional configuration options, see Foreign Server Configuration.

Querying Presto via a Foreign Server

While logged into Teradata as presto_user, or some other user that has access to the foreign server you created, you can issues the following commands to access data in Presto:

To see the list of schemas (databases) of a foreign server:

HELP FOREIGN SERVER presto_server;

To see the list of tables in a schema (database), e.g. db1:

HELP FOREIGN DATABASE db1@presto_server;

The Hive connector has a schema named default. When referencing this schema in any SQL statement, it needs to be quoted because default is a keyword:

HELP FOREIGN DATABASE "default"@presto_server;

To see the list of columns in a table from a foreign server:

HELP FOREIGN TABLE db1.region@presto_server;

Note

If the schema name has been provided during foreign server creation with the dbname name value pair, then you must not prefix the table name with the schema name.

To select a table from Presto:

SELECT * from db1.region@presto_server;

To insert into a table in Presto:

INSERT INTO db1.region@presto_server SELECT * from region_on_teradata_table;

To run a pass-through query directly on Presto:

SELECT *
FROM FOREIGN TABLE(
   SELECT count(*) as c
   FROM nation
)@presto_server AS presto_query

To execute DDL directly on Presto:

SELECT *
FROM FOREIGN TABLE(
   CREATE TABLE nation_copy AS SELECT * from nation
)@presto_server AS presto_query

When running a pass-through query, the syntax of the query is not checked at all, but the query is passed directly to Presto.

Drop Foreign Servers

To remove a foreign server, issue the following command:

./install-teradata drop_server \
                   --dba_logon dba_login,dba_password \
                   --server_name presto_server

Uninstall Driver

The driver can be uninstalled only after dropping all of the foreign servers. To uninstall the driver, execute the following command:

./install-teradata uninstall \
                  --dba_logon dba_login,dba_password

After uninstalling P2T, run the provided restart_jvm.bteq script to restart the JVM in Teradata to clean up resources allocated by the driver as dba_user:

.run file restart_jvm.bteq

Alternatively, you can run uninstall task with the restart parameter:

./install-teradata uninstall \
                    --dba_logon dba_login,dba_password
                   --restart

Upgrading T2P

In order to upgrade T2P, you will need to update both the Presto connector and the Teradata driver. Each release of T2P works with exactly one version of Presto, so upgrading Presto necessitates upgrading T2P, and vice versa. T2P works with both Teradata 15.00 and 15.10; there is no need to upgrade Teradata.

Upgrading Presto

In order to upgrade the Presto connector:

  1. Uninstall the querygrid connector on Presto:

    ./presto-admin package uninstall teradata-to-presto-connector
    
  2. Upgrade Presto to the version specified in the Compatibility Matrix. See the Presto documentation for the Presto upgrade itself.

  3. Install the new querygrid connector on Presto and restart Presto:
    ./presto-admin package install teradata-to-presto-connector
    ./presto-admin server restart
    

    The configuration files from the previous version of the querygrid connector will remain. You can edit them via ./presto-admin catalog add.

Upgrading Teradata

In order to upgrade the Teradata driver:

  1. Drop all existing foreign servers that use the old version of T2P. In order to see all existing foreign servers, you can issue the following query as dba_user:

    select * from dbc.serverv;

    Before dropping foreign servers, you may want to save the foreign server text:

    SHOW FOREIGN SERVER [foreign-server-name]
    
  2. Uninstall the old version of T2P, using the instructions in Uninstall Driver. Make sure to use uninstall_t2p.bteq from the old version of the driver.

  3. Restart the JVM for the Teradata Database using the restart_jvm.bteq script as dba_user:

    .run file restart_jvm.bteq
    
  4. Install the new version, using the instructions in Driver Installation. Make sure to use install_t2p.bteq from the new version of the driver.

  5. Re-create the foreign servers. The release notes will mention any changes to the foreign server DDL, otherwise the old foreign server DDL can be used.

Configuration

Foreign Server Configuration

The complete command line options for create_teradata_to_presto_server are as follows:

./install-teradata create_teradata_to_presto_server \
                   --user_logon user_login,user_password \
                   --server_name presto_server \
                   --presto_master_ip <presto_ip> \
                   [--server_catalog <presto_catalog_to_query>] \
                   [--server_schema default] \
                   [--presto_master_port <presto_port>] \
                   [--transport_coordinator_port port number] \
                   [--compression compression] \
                   [--presto_user username] \
                   [--presto_password password] \
                   [--presto_writer_count writer_count] \
                   [--server_options server_options]

Note that --compression and -presto_writer_count are performance-related; they can be added to tune performance for a given workload.

See below for a description of all of the options:

–user_logon
Teradata database credentials of the user that will use P2T, in the form user_login,user_password.
–server_name
The name of the foreign server.
–presto_master_ip
The IP address or hostname of the Presto coordinator, accessible from the Teradata hosts. This value must match the host provided in the data-exchange.coordinator.host-and-port property in the Presto configuration in Installation on Presto.
–server_catalog
The Presto catalog that the Teradata foreign server will query. To determine the possible catalogs, run SHOW CATALOGS on Presto; to add new catalogs, see the Presto connector documentation. If not specified, the default is hive.
–server_schema
The schema to query in the catalog specified by CATALOG_NAME. When set, it is not possible to query from any other schema. Without setting this parameter, you will need to explicitly specify the schema every time you run a query.
–presto_master_port
The port on which the Presto coordinator is running, accessible from the Teradata hosts. This value must match the port number provided in http-server.http.port. If not specified, the default is 8080.
–transport_coordinator_port
The port used by T2P to transfer data. This value must match the port number provided in the data-exchange.server.port property in the Presto configuration. If not specified, the default is 21337.
–compression

The type of compression used for data transfer between Presto and Teradata. If not specified, the data is not compressed.

If the network bandwidth is the bottleneck, data compression may increase throughput at the cost of increased CPU utilization. The possible values for COMPRESSION are LZ4 and SNAPPY. Both algorithms are focused on compression and decompression speed. Compression ratio and compression speed may vary for different queries and data sets.

–presto_user
The user that will execute queries on Presto. This user can be used for workload management – see the Presto queue documentation for more details. If not specified, the default is qg_t2p.
–presto_password
The password for the user that will execute queries on Presto. If not specified, the default is qg_t2p.
–presto_writer_count

The number of concurrent Presto result writer threads per node. If not specified, the default is 8. It must be a power of 2.

If your workload mainly consists of running large queries with low concurrency, you will more fully use your cluster if it is set to a higher value. However, if your workload contains concurrent queries, you may need to lower it.

For example, if your Presto cluster has 64 cores per machine, to fully utilize all of those cores with 4 concurrent queries, you need to set PrestoWriterCount to at least 16. However, a PrestoWriterCount that is too high can cause excessive CPU utilization. If Presto starts to fail with timeout related issues, try to decrease PrestoWriterCount.

When increasing PrestoWriterCount, you must also change the node-scheduler settings in Presto’s config.properties file:

node-scheduler.max-splits-per-node=MAX_SPLITS_PER_NODE
node-scheduler.max-pending-splits-per-node-per-task=MAX_SPLITS_PER_TASK_PER_NODE

Where MAX_SPLITS_PER_TASK_PER_NODE must be greater than or equal to PrestoWriterCount and MAX_SPLITS_PER_NODE must be greater than or equal to PrestoWriterCount multiplied by the number of queries that are intended to run concurrently. This Presto configuration change requires a Presto restart, which might require a downtime window for the Presto cluster.

–querygrid_catalog
The name of the Presto catalog installed for T2P. In most cases, this will be ‘querygrid’, unless in Installation on Presto a name other than querygrid.properties was used for the configuration file.
–server_options
All additional configuration parameters are set via server options. Server options are of the form "ServerOption('Parameter')". Note the single quotes for the parameter, even for integers, and the double quotes surrounding all of the server options. If specifying more than one server option, the options should be separated by spaces within the double quotes (e.g. "A('param') B('param')") The possible additional server options can be found in Additional Server Options.

Additional Server Options

The following options are valid in --server_options:

MaximumTextLength
The maximum length of text in Unicode characters that is transferred. If a VARCHAR or TEXT value is longer than MaximumTextLength, it will be silently truncated. When importing VARCHAR columns into Teradata, their maximum length (number of Unicode characters) is MaximumTextLength. The maximum row size in Teradata is approximately 64K, so for tables with many VARCHAR columns, it may be necessary to decrease this value. If not specified, the default is 4096 Unicode characters.
MaximumBinaryLength
The maximum length of binary data in bytes that is transferred. If binary data is longer than MaximumBinaryLength, an error is thrown. If not specified, the default is 4096 bytes.
ReadTimeout

The maximum amount of time spent waiting for query results. It is recommended to increase this value for queries that require complex computation before returning any data. Timeouts must have both a number and a unit: for example, 10s, 5m, or 2h.

SELECT *
FROM FOREIGN TABLE(
  SELECT count(*)
  FROM some_enormous_table
)@foreign_server AS table;

If not specified, the default is 2h.

WriteTimeout

The maximum amount of time spent waiting for consumer to consume the results. It is recommended to increase this value for queries that require complex computation after consuming the data. Timeouts must have both a number and a unit: for example, 10s, 5m, or 2h.

SELECT fibonacci(bigint_column)
FROM large_table@foreign_server;

If not specified, the default is 1h.

QueryTimeout

The maximum amount of time spent waiting for the remote query to finish after data transfer is finished. It is recommended to increase this value for INSERT INTO queries which insert the data into slow consuming connectors. Timeouts must have both a number and a unit: for example, 10s, 5m, or 2h.

INSERT INTO "slow_consuming_connector"."slow_consuming_table"
SELECT * FROM large_table;

If not specified, the default is 1h.

Data Exchange Configuration

The following properties control the data exchange. They can be set for both Presto and Teradata:

  • data-exchange.server.buffer-size - query results write buffer size. The buffer is shared between all the queries that are in progress. If not specified, the default is 2GB.
  • data-exchange.server.port - data transfer server port. If not specified, the default is 21337.
  • data-exchange.client.buffer-size - query results read buffer size. The buffer is shared between all the queries that are in progress. If not specified, the default is 2GB.

Note

Buffer sizes must be specified in human readable data size notation: 100MB, 1GB, 1TB

The data-exchange.server.buffer-size and data-exchange.client.buffer-size properties may need to be changed if latency in the system causes the buffers to fill up. This will cause increased memory usage by T2P.

The data-exchange.server-port property must be changed if the port 21337 is not free. If the port on Presto is changed, TRANSPORT_COORDINATOR_PORT in the foreign server definition, as described in `Optional Name Value Pairs`_, must also be changed to match.

To change a property for Presto, edit the T2P connector configuration file (~/.prestoadmin/catalog/querygrid.properties). To apply your changes, distribute new properties file to all Presto nodes and restart the Presto server:

./presto-admin catalog add querygrid
./presto-admin server restart

For Teradata, the data exchange properties are shared across all T2P foreign servers. In order to change a static property for Teradata, you must set a JVM system property in the following format: -Dt2p.property.name=value. Properties for the Teradata JVM can be set using the cufconfig utility. To apply your changes, you must restart the Teradata database JVM using the restart_jvm.bteq script as dba_user.

Kerberos Support

It is possible to create a foreign server that connects to Presto via Kerberos. Before doing so, you must set up the Presto server to authenticate via Kerberos (see the Presto docs: http://teradata.github.io/presto/docs/current/security/server.html). A few notes about how to set up Kerberos on the Presto side:

  • The Presto coordinator principal (specified by the property http.server.authentication.krb5.service-name) must be HTTP.

  • The SSL keystore (specified by the property http-server.https.keystore.path) must contain as a common name the value below <presto_master_ip>. <presto_master_ip> can be a hostname, but that hostname must be in the /etc/hosts file of all of the Teradata nodes. When specifying a common name (CN) that is an IP address, it is necessary to also specify the subjectAltName extension. For example:

    keytool -genkeypair \
        -alias presto \
        -keyalg RSA \
        -keystore /etc/presto/keystore.jks \
        -keypass password \
        -storepass password \
        -dname "CN=<ip address>, OU=, O=, L=, S=, C=" -ext san=ip:<ip address>
    
  • It is possible to add multiple entries to one keystore by running the above command with different aliases, common names, and IPs. You should add all of the IP addresses by which it is possible to connect to Presto from Teradata (including bynet addresses).

To set up Kerberos on the Teradata side:

  1. Install version 1.4.3 or later of the krb5 and krb5-client packages on all of the nodes in the Teradata cluster. The krb5 packages are included on the standard Teradata Database Linux operating system DVD.

  2. Copy the krb5.conf file from your Presto cluster to /etc/krb5.conf on all of the nodes in the Teradata cluster.

  3. Add the hostname for the machine running the KDC to the /etc/hosts file on all of the nodes in the Teradata cluster.

  4. Install the appropriate Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files for your Java 8 JRE. Download them from here: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html, and follow the README to install.

  5. Create an authorization object. This authorization object will store credentials for the remote Kerberos system to be used during execution of queries by the foreign server. For more information on authorization objects, see the Teradata database documentation. For example:

    CREATE AUTHORIZATION remote_user1 AS INVOKER TRUSTED
    USER '<kerberos_principal>' PASSWORD '<kerberos_password>';
    
  6. Copy the SSL certificate keystore specified by the Presto property http-server.https.keystore.path to /etc/opt/teradata/querygrid/keystore.jks on all of the Teradata nodes. Make sure that the file is readable by the user tdatuser; other than that, keep the permissions on this file as restrictive as possible.

  7. Create the foreign server:

    ./install-teradata create_kerberized_teradata_to_presto_server \
                          --user_logon <user_login>,<user_password> \
                          --presto_master_ip  <presto_master_ip> \
                          --presto_https_port <https_port>
                          --server_name <foreign_server_name> \
                          --authorization_object <auth_object>
    

<https_port> should be set to the port specified by the Presto property http-server.https.port. As stated above, <presto_master_ip>, which can be either an IP address or a hostname, needs to be added to the keystore on Presto. <auth_object> is the authorization object created above. The user specified by <user_logon> must have access to the object.

The same optional arguments as in Foreign Server Configuration are permitted.

Technical Specification

Type Support

The following table refers to type handling/conversion between the Presto query engine and Teradata. Type handling can differ between Presto connectors or even between storage types within a connector. Please refer to the Presto documentation for specific connectors for more details.

Type in Presto Type in Teradata Notes
BOOLEAN BYTEINT  
TINYINT BYTEINT  
SMALLINT SMALLINT  
INTEGER INTEGER  
BIGINT BIGINT  
DOUBLE REAL  
DECIMAL(X,Y) DECIMAL(X,Y) Max precision in both Presto and Teradata is 38; scale <= precision
CHAR(X) CHAR(X)  
VARCHAR(X) VARCHAR(X) Presto VARCHAR length is truncated at MaximumTextLength (by default 4096 characters)
VARCHAR VARCHAR(MaximumTextLength)  
DATE DATE  
TIMESTAMP TIMESTAMP  
VARBINARY VARBYTE Error thrown on values exceeding MaximumBinaryLength (by default 4096 bytes)
JSON VARCHAR  
ARRAY VARCHAR Serialized to/from json
MAP VARCHAR Serialized to/from json
ROW VARCHAR Serialized to json in import path. Writing ROW values to Presto is not supported

There is limited support for CHAR. CHAR columns can be exported from Teradata to Presto VARCHAR columns, since Presto does not have the CHAR type. Presto VARCHAR columns can be inserted into Teradata CHAR columns.

Known Issues/Limitations

  • Complex Presto types – ARRAY, MAP, and ROW – are translated to JSON and are visible in Teradata as strings. Large, complex objects may not be able to be selected, because their JSON string representation may exceed the Teradata maximum row length of 64KB.

  • Native Presto queries that have aggregations without explicitly specified aliases fail with the error, “Presto query failed: Column name not specified at position 1”.

    SELECT *
    FROM FOREIGN TABLE(
       SELECT count(*)
       FROM nation
    )@presto_server AS presto_query
    

    Provide an alias explicitly to make it work:

    SELECT *
    FROM FOREIGN TABLE(
       SELECT count(*) as some_explicit_alias
       FROM nation
    )@presto_server AS presto_query
    
  • Currently, T2P is limited to 20 concurrent queries. However, if your queries are long running or take a lot of resources (e.g. if they have a big result set), it is recommended to run fewer than 20 queries. Otherwise, you may get a Teradata error:

    [Error 7583] [SQLState HY000] The secure mode processes had a set up error.
    
  • High presto_writer_count can cause high CPU utilization. If the Presto starts to fail with the timeout related issue try to decrease presto_writer_count.

  • If you get the error, “Another instance of the Querygrid driver is still running.”, please restart your Teradata database JVM with the``restart_jvm.bteq`` script.

Release Notes

Release 1.2

  • The Name Value Pair for the catalog name in foreign server creation is now CATALOG_NAME. It used to be DB_NAME, and any DDL for previous foreign servers that specifies the Presto catalog will need to be updated.
  • Add support for data types INTEGER, TINYINT, SMALLINT, FLOAT, CHAR, and parameterized VARCHAR.
  • Add support for remote DDL execution (see here)
  • Add support for multi-byte UTF-16 characters.
  • Fix bug in handling DECIMAL of precision 18.
  • Trim VARCHAR values being pushed down to Presto, because Teradata VARCHAR equality ignores whitespace, but Presto VARCHAR equality does not.
  • Improved performance by implementing low latency connection mechanisms.

Release 1.2.3

  • Fix bug in timestamp pushdown.

Release 1.3

  • Update QueryGrid to work with Presto 0.152-t.
  • Add logging for the QueryGrid server version in /tmp/querygrid-presto-driver.log on query startup on Teradata.
  • Improved data transfer speed and resource utilization to lower CPU use on TD.
  • FLOAT type is mapped to Presto REAL since the name of the Presto type changed.

Release 1.3.1

  • Fix bug in timestamp pushdown.

Release 1.4

  • Update QueryGrid to work with Presto 0.157-t.

Release 1.4.3

  • Fix bug in timestamp pushdown.

Release 1.5

  • Update QueryGrid to work with Presto 0.167-t.