Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 58 additions & 25 deletions docs/src/main/sphinx/connector/elasticsearch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,31 +117,62 @@ The allowed configuration values are:
- The key password for the trust store specified by
``elasticsearch.tls.truststore-path``.

Data types
----------

The data type mappings are as follows:

Primitive types
^^^^^^^^^^^^^^^

============= =============
Elasticsearch Trino
============= =============
``binary`` ``VARBINARY``
``boolean`` ``BOOLEAN``
``double`` ``DOUBLE``
``float`` ``REAL``
``byte`` ``TINYINT``
``short`` ``SMALLINT``
``integer`` ``INTEGER``
``long`` ``BIGINT``
``keyword`` ``VARCHAR``
``text`` ``VARCHAR``
``date`` ``TIMESTAMP``
``ip`` ``IPADDRESS``
(all others) (unsupported)
============= =============
.. _elasticesearch-type-mapping:

Type mapping
------------

Because Trino and Elasticsearch each support types that the other does not, this
connector :ref:`maps some types <type-mapping-overview>` when reading data.

Elasticsearch type to Trino type mapping
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The connector maps Elasticsearch types to the corresponding Trino types
according to the following table:

.. list-table:: Elasticsearch type to Trino type mapping
:widths: 30, 30, 50
:header-rows: 1

* - Elasticsearch type
- Trino type
- Notes
* - ``BOOLEAN``
- ``BOOLEAN``
-
* - ``DOUBLE``
- ``DOUBLE``
-
* - ``FLOAT``
- ``REAL``
-
* - ``BYTE``
- ``TINYINT``
-
* - ``SHORT``
- ``SMALLINT``
-
* - ``INTEGER``
- ``INTEGER``
-
* - ``LONG``
- ``BIGINT``
-
* - ``KEYWORD``
- ``VARCHAR``
-
* - ``TEXT``
- ``VARCHAR``
-
* - ``DATE``
- ``TIMESTAMP``
- For more information, see :ref:`elasticsearch-date-types`.
* - ``IPADDRESS``
- ``IP``
-

No other types are supported.

.. _elasticsearch-array-types:

Expand Down Expand Up @@ -195,6 +226,8 @@ property definition to the ``_meta.trino`` property of the target index mapping.

It is not allowed to use ``asRawJson`` and ``isArray`` flags simultaneously for the same column.

.. _elasticsearch-date-types:

Date types
^^^^^^^^^^

Expand Down