We are proud to share our inclusion in the 2024 Gartner Magic Quadrant for Data Integration Tools. We believe this recognition reflects the differentiated business outcomes CData delivers to our customers.
Get the Report →Export Data from SQL Server to Elasticsearch through SSIS
Easily push SQL Server data to Elasticsearch using the CData SSIS Tasks for Elasticsearch.
![The data source modeled as tables.](../articles/ssis-sf-task-export-2008-2.png)
SQL Server databases are commonly used to store enterprise records. It is often necessary to move this data to other locations. The CData SSIS Task for Elasticsearch allows you to easily transfer Elasticsearch data. In this article you will export data from SQL Server to Elasticsearch.
About Elasticsearch Data Integration
Accessing and integrating live data from Elasticsearch has never been easier with CData. Customers rely on CData connectivity to:
- Access both the SQL endpoints and REST endpoints, optimizing connectivity and offering more options when it comes to reading and writing Elasticsearch data.
- Connect to virtually every Elasticsearch instance starting with v2.2 and Open Source Elasticsearch subscriptions.
- Always receive a relevance score for the query results without explicitly requiring the SCORE() function, simplifying access from 3rd party tools and easily seeing how the query results rank in text relevance.
- Search through multiple indices, relying on Elasticsearch to manage and process the query and results instead of the client machine.
Users frequently integrate Elasticsearch data with analytics tools such as Crystal Reports, Power BI, and Excel, and leverage our tools to enable a single, federated access layer to all of their data sources, including Elasticsearch.
For more information on CData's Elasticsearch solutions, check out our Knowledge Base article: CData Elasticsearch Driver Features & Differentiators.
Getting Started
Add Source and Destination Components
To get started, add a new ADO.NET Source control and a new Elasticsearch Destination control to the data flow task.
![The source and destination components used in this example.](../articles/ssis-sf-task-export-2008-1.png)
Configure the ADO.NET Source
Follow the steps below to specify properties required to connect to the SQL Server instance.
- Open the ADO.NET Source and add a new connection. Enter your server and database information here.
- In the Data access mode menu, select "Table or view" and select the table or view to export into Elasticsearch.
- Close the ADO NET Source wizard and connect it to the destination component.
![The SQL Server table to export into Elasticsearch.](../articles/ssis-sf-task-export-2008-2.png)
Create a New Connection Manager for Elasticsearch
Follow the steps below to set required connection properties in the Connection Manager.
- Create a new connection manager: In the Connection Manager window, right-click and then click New Connection. The Add SSIS Connection Manager dialog is displayed.
- Select CData Elasticsearch Connection Manager in the menu.
-
Configure the connection properties.
Set the Server and Port connection properties to connect. To authenticate, set the User and Password properties, PKI (public key infrastructure) properties, or both. To use PKI, set the SSLClientCert, SSLClientCertType, SSLClientCertSubject, and SSLClientCertPassword properties.
The data provider uses X-Pack Security for TLS/SSL and authentication. To connect over TLS/SSL, prefix the Server value with 'https://'. Note: TLS/SSL and client authentication must be enabled on X-Pack to use PKI.
Once the data provider is connected, X-Pack will then perform user authentication and grant role permissions based on the realms you have configured.
Configure the Elasticsearch Destination
In the destination component Connection Manager, define mappings from the SQL Server source table into the Elasticsearch destination table and the action you want to perform on the Elasticsearch data. In this article, you will insert Orders entities to Elasticsearch.
- Double-click the Elasticsearch destination to open the destination component editor.
- In the Connection Managers tab, select the connection manager previously created.
-
In the Use a Table, menu, select Orders.
In the Action menu, select Insert.
-
On the Column Mappings tab, configure the mappings from the input columns to the destination columns.
Run the Project
You can now run the project. After the SSIS Task has finished executing, data from your SQL table will be exported to the chosen table.
![The SQL Server table to export into Elasticsearch.](../articles/ssis-sf-task-export-2008-5.png)