h2o.import_sql_select: Import SQL table that is result of SELECT SQL query into H2O
Description
Creates a temporary SQL table from the specified sql_query.
Runs multiple SELECT SQL queries on the temporary table concurrently for parallel ingestion, then drops the table.
Be sure to start the h2o.jar in the terminal with your downloaded JDBC driver in the classpath:
`java -cp : water.H2OApp`
Also see h2o.import_sql_table.
Currently supported SQL databases are MySQL, PostgreSQL, and MariaDB. Support for Oracle 12g and Microsoft SQL Server
URL of the SQL database connection as specified by the Java Database Connectivity (JDBC) Driver.
For example, "jdbc:mysql://localhost:3306/menagerie?&useSSL=false"
select_query
SQL query starting with `SELECT` that returns rows from one or more database tables.
username
Username for SQL server
password
Password for SQL server
optimize
(Optional) Optimize import of SQL table for faster imports. Experimental. Default is true.
Details
For example,
my_sql_conn_url <- "jdbc:mysql://172.16.2.178:3306/ingestSQL?&useSSL=false"
select_query <- "SELECT bikeid from citibike20k"
username <- "root"
password <- "abc123"
my_citibike_data <- h2o.import_sql_select(my_sql_conn_url, select_query, username, password)