docs/src/main/sphinx/connector/ignite.md
The Ignite connector allows querying an Apache Ignite database from Trino.
To connect to an Ignite server, you need:
--add-opens=java.base/java.nio=ALL-UNNAMED in the jvm.config when starting the Trino server.The Ignite connector expose public schema by default.
The connector can query an Ignite instance. Create a catalog properties file
that specifies the Ignite connector by setting the connector.name to
ignite.
For example, to access an instance as example, create the file
etc/catalog/example.properties. Replace the connection properties as
appropriate for your setup:
connector.name=ignite
connection-url=jdbc:ignite:thin://host1:10800/
connection-user=exampleuser
connection-password=examplepassword
The connection-url defines the connection information and parameters to pass
to the Ignite JDBC driver. The parameters for the URL are available in the
Ignite JDBC driver documentation.
Some parameters can have adverse effects on the connector behavior or not work
with the connector.
The connection-user and connection-password are typically required and
determine the user credentials for the connection, often a service user. You can
use {doc}secrets </security/secrets> to avoid actual values in the catalog
properties files.
If you have multiple Ignite servers you need to configure one catalog for each server. To add another catalog:
etc/catalog.propertiesFor example, if you name the property file sales.properties, Trino uses the
configured connector to create a catalog named sales.
Table property usage example:
CREATE TABLE public.person (
id BIGINT NOT NULL,
birthday DATE NOT NULL,
name VARCHAR(26),
age BIGINT,
logdate DATE
)
WITH (
primary_key = ARRAY['id', 'birthday']
);
The following are supported Ignite table properties from https://ignite.apache.org/docs/latest/sql-reference/ddl
:::{list-table} :widths: 30, 10, 60 :header-rows: 1
primary_keyprimary_keyThis is a list of columns to be used as the table's primary key. If not specified, a VARCHAR primary key column named DUMMY_ID is generated,
the value is derived from the value generated by the UUID function in Ignite.
(ignite-type-mapping)=
The following are supported Ignite SQL data types from https://ignite.apache.org/docs/latest/sql-reference/data-types
:::{list-table} :widths: 25, 25, 50 :header-rows: 1
BOOLEANBOOLEANTRUE and FALSEBIGINTBIGINT-9223372036854775808, 9223372036854775807, etc.DECIMALDECIMALDOUBLEDOUBLE3.14, -10.24, etc.INTINT-2147483648, 2147483647, etc.REALREAL3.14, -10.24, etc.SMALLINTSMALLINT-32768, 32767, etc.TINYINTTINYINT-128, 127, etc.CHARCHARhello, Trino, etc.VARCHARVARCHARhello, Trino, etc.DATEDATE1972-01-01, 2021-07-15, etc.BINARYVARBINARY(ignite-sql-support)=
The connector provides read access and write access to data and metadata in
Ignite. In addition to the {ref}globally available <sql-globally-available> and {ref}read operation <sql-read-operations>
statements, the connector supports the following features:
(ignite-insert)=
(ignite-update)=
(ignite-merge)=
(ignite-alter-table)=
(ignite-procedures)=
(ignite-pushdown)=
The connector supports pushdown for a number of operations:
join-pushdownlimit-pushdowntopn-pushdown{ref}Aggregate pushdown <aggregation-pushdown> for the following functions:
avgcountmaxminsum