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 Elasticseach 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.
For the full list of connection options with syntax and detailed descriptions, see: Elasticsearch connection with SQL
Once you've created your connection, you are ready to move on to the next step of building your data pipeline: Output to an Elasticsearch index
Alter an Elasticsearch connection
Certain connection options are considered mutable, meaning that in some cases, you can run a SQL command to alter an existing Elasticseach 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:
To check which specific connection options are mutable, see: Elasticsearch connection with SQL
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.
For more details, see: DROP CONNECTION
Last updated