Elasticsearch

This article describes how to create a connection to Elasticsearch using a SQL command.

To write your transformed data into an Elasticsearch index using SQLake, you must first create a connection that provides the appropriate credentials to access your cluster.

CREATE ELASTICSEARCH CONNECTION my_elasticsearch
    CONNECTION_STRING = 'elasticsearch://host:port?cluster.name=your_cluster_name'
    USER_NAME = 'your_user'
    PASSWORD = 'your_password';

Connection options

CONNECTION_STRING — editable

Type: text

The connection string to use when connecting to the cluster.

Format:

'elasticsearch://host:port?cluster.name=your_cluster_name'

USER_NAME — editable with password

Type: text

The user to authenticate to the cluster.

PASSWORD — editable with user_name

Type: text

The password for the user.

COMMENT — editable

Type: text

(Optional) A description or comment regarding this connection.

Example

CREATE ELASTICSEARCH CONNECTION my_elasticsearch
    CONNECTION_STRING = 'elasticsearch://search-elastic1-tiq6hb7ltwvcu2vwp3tbixyzey.us-east-1.es.amazonaws.com:443?cluster.name=elastic_main&ssl=true'
    USER_NAME = 'your_user'
    PASSWORD = 'your_password'
    COMMENT = 'My new Elasticsearch connection';

Last updated