@daichen Thanks for reply sir…
I am using h2o(machine learning framework application to import elasticsearch index table using JDBC .Below is the code.
conn_url = “jdbc:elasticsearch://https://127.0.0.1:9200?trustSelfSigned=true”
table = “esindextable”
username = “admin”
password = “admin”
h2o_importtable= h2o.import_sql_table(conn_url, table, username, password)
Below is the h2o documentation link for sql table import.
https://docs.h2o.ai/h2o/latest-stable/h2o-py/docs/h2o.html
h2o.import_sql_table(connection_url, table, username, password, columns=None, optimize=True, fetch_mode=None, num_chunks_hint=None)[source]
Import SQL table to H2OFrame in memory.
Assumes that the SQL table is not being updated and is stable. Runs multiple SELECT SQL queries concurrently for parallel ingestion. Be sure to start the h2o.jar in the terminal with your downloaded JDBC driver in the classpath:
java -cp <path_to_h2o_jar>:<path_to_jdbc_driver_jar> water.H2OApp
Also see import_sql_select(). Currently supported SQL databases are MySQL, PostgreSQL, MariaDB, Hive, Oracle and Microsoft SQL.
Parameters
connection_url – URL of the SQL database connection as specified by the Java Database Connectivity (JDBC) Driver. For example, “jdbc:mysql://localhost:3306/menagerie?&useSSL=false”
table – name of SQL table
columns – a list of column names to import from SQL table. Default is to import all columns.
username – username for SQL server
password – password for SQL server
optimize – DEPRECATED. Ignored - use fetch_mode instead. Optimize import of SQL table for faster imports.
fetch_mode – Set to DISTRIBUTED to enable distributed import. Set to SINGLE to force a sequential read by a single node from the database.
num_chunks_hint – Desired number of chunks for the target Frame.
Returns
an H2OFrame containing data of the specified SQL table.
Thanks
Sarvendra