Load the H2OPredict DAI License | Vantage BYOM - Load the H2O Driverless AI License - Teradata Vantage

Teradata Vantage™ - Bring Your Own Model User Guide

Teradata Vantage
Release Number
October 2023
English (United States)
Last Update

A user license for H2O Driverless AI (DAI) is required when scoring DAI models in H2OPredict.

Options for Loading the DAI License

You can avoid putting the license key as a string value in every H2OPredict query that uses a DAI model by installing the H2O DAI license using one of the following two options:
Option Description
Option 1 [Recommended] Create a table to store the H2O DAI license key and load the license key into the table (encrypted or non-encrypted) as a long string without a carriage return.
create table h2o_dai_lic (
id integer between 1 and 1,
license varchar(2500)
) unique primary index(id);

insert into h2o_dai_lic values (1, License key text here, encrypted or not)
The table must restrict the ID value to be between 1 and 1 so only one license resides in the table and the ID must be 1. The column must be named license. When there are multiple license keys, multiple tables must be created with one license per table.
Option 2 Add the license key into the models table instead of creating license tables. This requires including the license key for every DAI model row in the table and adding a new license column as in the following example:
alter h2o_models add license varchar(2500);
You have the option to set the license column to the license key value so the key value is automatically included for all the models (all the rows) by updating the column using the following SQL statement:
update models_table set license = license key text here. Encrypted or not;
Use the following SQL statement to add the license key for an individual model already in the models table:
update models_table set license = license key text here. Encrypted or not
where model_id = 'DAI model_id';

You can provide the license information at any time using one of the previously listed options. However, when running a query that uses a DAI model, an error is thrown if the license key has not been provided.

If the H2O DAI license expires and the license key is in a separate table (option 1), update the license key as follows:
update h2o_dai_lic set license = license key – Encrypted or not
where id = 1;

License Key in H2OPredict Queries on DAI Models

Include the license key in the model ON clause of the H2OPredict call in the query.
You must name the license column license, order does not matter.
Example where the license key is in a license table:
ON (SELECT model_id, model,h2o_lic.license FROM h2o_models WHERE model_id = 'pipeline_model') DIMENSION
Example where the license key is in the models table:
on (SELECT model_id, model, license FROM h2o_models WHERE model_id = 'pipeline_model') DIMENSION

DAI User License Encryption

  • A utility (shell script), encrypt_dai_license.sh, is available to optionally encrypt the license and is available on https://downloads.teradata.com/.
  • Encryption is based on the RSA algorithm, which involves both a public and private key.
  • When encrypting the license, you must perform one of the following actions:
    Action Description
    Create an environment variable DAI_LIC_KEY The string value is the DAI license key.

    The utility encrypts the value and returns the encrypted key value.

    Save the file license.sig in the same location as the script The license.sig file contains the license key as a flat file located in /var/opt/teradata/byom/ with VantageCore (on-premisis) systems.

    Only one license can be added in the file.

    The utility encrypts the key in the flat file and returns the encrypted key.

    The utility script only runs on Linux or Macintosh systems.
  • When a license expires, the same utility must be used to encrypt the updated license before loading the new license.
  • The license key is decrypted by H2OPredict using a private key.
  • See H2O DAI License End-to-End Example for an example of how to encrypt, install, and use an H2O DAI license in the H2OPredict call in a query.