Load sql server data into elasticsearch without query using logstash


I want to load all the tables along with the data present within the database schema(i.e, QWEQWE), without using query.

With query we can load data from sql server from multiple tables into elasticsearch as shown in below example.
But i need to load all the tables from sql server by mentioning the database schema, username and password.

input {

jdbc {
jdbc_driver_library => "C:/Users/xxxx/Downloads/sqljdbc4-2.0.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://localhost:1433;user=qqqq;password=vvvv@123;database=QWEQWE"
jdbc_user => "qqqq"
jdbc_password => "vvvv@123"
statement => "SELECT TOP 1000 * FROM SAMPLE"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"


I need all tables data without "statement" tag and retrive all tables data.

Is this possible? Please help me.

Thanks in advance.

(Christian Dahlqvist) #2

Logstash only supports moving data by querying over JDBC. I am not aware of any solution that replicates all tables in a database, and even if such a solution existed, you probably would want to restructure your data into a document-centric model before you move the data as Elasticsearch is not a relational system and does not support joins.

Load sql server data into elasticsearch without query

thank you for your response,

I want to load the complete data with database schema, if there is any possibility,Please help me

(Christian Dahlqvist) #4

I am not aware off any tool that does this, so the easiest way may be for you to write a script/program using one of the available language clients. Before you do so, do consider how you want to be able to search the data and whether replicating the structure in your relational database will allow you to achieve this.


ok Christian, thanks for your response, i will check it

(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.