Package com.illumon.iris.db.tables.utils
Class JdbcHelpers
java.lang.Object
com.illumon.iris.db.tables.utils.JdbcHelpers
public class JdbcHelpers extends Object
Tools for reading data from a JDBC source into an in-memory Deephaven table.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JdbcHelpers.ReadJdbcOptions
Options applicable when reading JDBC data into a Deephaven in-memory table. -
Constructor Summary
Constructors Constructor Description JdbcHelpers()
-
Method Summary
Modifier and Type Method Description static Table
readJdbc(String jdbcDriver, String jdbcUrl, String query)
Return a JDBC query result as an in-memory Deephaven table.static Table
readJdbc(String jdbcDriver, String jdbcUrl, String query, JdbcHelpers.ReadJdbcOptions options)
Return a JDBC query result as an in-memory Deephaven table.static Table
readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String query)
Return a JDBC query result as an in-memory Deephaven table.static Table
readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String query, JdbcHelpers.ReadJdbcOptions options)
Return a JDBC query result as an in-memory Deephaven table.static Table
readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String catalog, String schema, String query, JdbcHelpers.ReadJdbcOptions options)
Return a JDBC query result as an in-memory Deephaven table.static Table
readJdbc(ResultSet resultSet)
Return a JDBC query result as an in-memory Deephaven table.static Table
readJdbc(ResultSet resultSet, JdbcHelpers.ReadJdbcOptions options, StatusCallback progress)
Return a JDBC query result as an in-memory Deephaven table.static Table
readJdbc(ResultSet resultSet, StatusCallback progress)
Return a JDBC query result as an in-memory Deephaven table.static JdbcHelpers.ReadJdbcOptions
readJdbcOptions()
Returns a new options object that the user can use to customize a readJdbc operation.
-
Constructor Details
-
JdbcHelpers
public JdbcHelpers()
-
-
Method Details
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String query) throws IOException, SQLExceptionReturn a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver
- JDBC driver to usejdbcUrl
- JDBC URL/connection stringuser
- JDBC userpassword
- JDBC passwordquery
- an SQL query- Returns:
- in memory table with results of the given query
- Throws:
IOException
- if an error occurs with Schema generation or table writingSQLException
- is a JDBC related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String query, JdbcHelpers.ReadJdbcOptions options) throws IOException, SQLExceptionReturn a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver
- JDBC driver to usejdbcUrl
- JDBC URL/connection stringuser
- JDBC userpassword
- JDBC passwordquery
- an SQL queryoptions
- options to apply to the read/mapping operation- Returns:
- in memory table with results of the given query
- Throws:
IOException
- if an error occurs with Schema generation or table writingSQLException
- is a JDBC related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String query) throws IOException, SQLExceptionReturn a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver
- JDBC driver to usejdbcUrl
- JDBC URL/connection stringquery
- an SQL query- Returns:
- in memory table with results of the given query
- Throws:
IOException
- if an error occurs with Schema generation or table writingSQLException
- if a JDBC-related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String query, JdbcHelpers.ReadJdbcOptions options) throws IOException, SQLExceptionReturn a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver
- JDBC driver to usejdbcUrl
- JDBC URL/connection stringquery
- an SQL queryoptions
- options to apply to the read/mapping operation- Returns:
- in memory table with results of the given query
- Throws:
IOException
- if an error occurs with Schema generation or table writingSQLException
- if a JDBC-related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String catalog, String schema, String query, JdbcHelpers.ReadJdbcOptions options) throws IOException, SQLExceptionReturn a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver
- JDBC driver to usejdbcUrl
- JDBC URL/connection stringuser
- JDBC userpassword
- JDBC passwordcatalog
- the desired JDBC system catalog (specify null for default)schema
- the desired JDBC schema (specify null for default)query
- an SQL queryoptions
- options to apply to the read/mapping operation- Returns:
- in memory table with results of the given query
- Throws:
IOException
- if an error occurs with Schema generation or table writingSQLException
- if a JDBC-related error occurs
-
readJdbc
Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
resultSet
- an open JDBC ResultSet- Returns:
- in memory table with results of the given ResultSet
- Throws:
IOException
- if an error occurs with Schema generation or table writing
-
readJdbc
Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
resultSet
- an open JDBC ResultSetprogress
- status callback- Returns:
- in memory table with results of the given ResultSet
- Throws:
IOException
- if an error occurs with Schema generation or table writing
-
readJdbc
public static Table readJdbc(ResultSet resultSet, JdbcHelpers.ReadJdbcOptions options, StatusCallback progress) throws IOExceptionReturn a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
resultSet
- an open JDBC ResultSetoptions
- options to apply to the read/mapping operationprogress
- status callback- Returns:
- in memory table with results of the given ResultSet
- Throws:
IOException
- if an error occurs with Schema generation or table writing
-
readJdbcOptions
Returns a new options object that the user can use to customize a readJdbc operation.- Returns:
- a new ReadJdbcOptions object
-