Elasticsearch
This article describes how to create and maintain connections to your Elasticsearch cluster.
Before you can write your transformed data to an index in Elasticsearch, you should first establish a connection to your Elasticsearch cluster.
Create an Elasticsearch connection
Simple example
An Elasticsearch connection can be created as simply as follows:
Note that an Elasticsearch connection must specify the cluster name it is connecting to within the connection string. This means that in order to connect to multiple clusters within your account, you need to create at least one connection per cluster.
Alter an Elasticsearch connection
Some connection options are considered mutable, meaning that in some cases, you can run a SQL command to alter an existing Elasticsearch connection rather than create a new one.
For example, take the Snowflake connection we created previously:
To change the host you are connecting to but keep everything else the same without having to create an entirely new connection, you can run the following command:
Drop an Elasticsearch connection
If you no longer need a certain connection, you can easily drop it with the following SQL command:
However, note that if there are existing jobs that are dependent upon the connection in question, the connection cannot be deleted.
Learn More
To discover which connection options are mutable, and to learn more about the options, please see the SQL command reference for Elasticsearch.
Last updated