Uploaded image for project: 'Solution Center'
  1. Solution Center
  2. SOL-196

EXAloader 3rd party JDBC requirements for IMPORT and EXPORT command

    Details

    • Type: Explanation
    • Status: Obsolete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: EXAloader
    • Labels:
      None
    • Explanation:
      Hide

      Note: This solution is no longer maintained. For the latest information, please visit our Knowledge Base:

      https://community.exasol.com/t5/connect-with-exasol/exaloader-3rd-party-jdbc-requirements-for-import-and-export/ta-p/484

      ------------------------------------------------------------------------------------------------------------------------------------------------------------------

      Background

       Requirements:

      • a license which includes the extra database feature called "Generic JDBC connections"
      • a JDBC data source which is reachable by all cluster nodes
      • an appropriate JDBC driver uploaded and configured in the cluster via EXAoperation

       When using the JDBC driver in IMPORT or EXPORT commands, you get error messages like

      [42636] ETL-5402: JDBC-Client-Error: Exception while disconnecting: Method not supported (Session: 1484043015261801495)

       Explanation

       When IMPORTing data from JDBC sources, EXAloader requires that the following methods are implemented by the JDBC driver.

      • java.sql.Connection
        • void setAutoCommit(boolean autoCommit)
        • Statement createStatement()
        • PreparedStatement prepareStatement(String sql)
        • void rollback()
        • void close()
      • java.sql.Statement
        • void setFetchSize(int rows)
        • ResultSet executeQuery(String sql)
        • void close()
      • java.sql.PreparedStatement
        • ResultSetMetaData getMetaData()
      • java.sql.ResultSetMetaData
        • int getColumnCount()
        • int getColumnType(int column)
        • String getColumnName(int column)
      • java.sql.ResultSet
        • ResultSetMetaData getMetaData()
        • boolean next()
        • long getLong(int columnIndex)
        • double getDouble(int columnIndex)
        • BigDecimal getBigDecimal(int columnIndex)
        • String getString(int columnIndex)
        • Date getDate(int columnIndex)
        • Timestamp getTimestamp(int columnIndex)
        • Clob getClob(int columnIndex)
        • boolean getBoolean(int columnIndex)
        • boolean wasNull()
        • void close()

      When EXPORTing data into JDBC sources, EXAloader requires that the following methods are implemented by the JDBC driver.

      • java.sql.Connection
        • void setAutoCommit(boolean autoCommit)
        • Statement createStatement()
        • PreparedStatement prepareStatement(String sql)
        • void rollback()
        • void commit()
        • void close()
      • java.sql.Statement
        • int[] executeBatch()
        • boolean execute(String sql)
        • void close()
      • java.sql.PreparedStatement
        • ParameterMetaData getParameterMetaData()
        • void setLong(int parameterIndex, long x)
        • void setDouble(int parameterIndex, double x)
        • void setString(int parameterIndex, String x)
        • void setDate(int parameterIndex, Date x)
        • void setTimestamp(int parameterIndex, Timestamp x)
        • void setBoolean(int parameterIndex, boolean x)
        • void setNull(int parameterIndex, int sqlType)
        • void addBatch()
      • java.sql.ParameterMetaData
        • int getParameterCount()
        • int getParameterType(int param)

      Additional Notes

      In order to use a JDBC driver that doesn't support all required functions, you can write a wrapper for it; in that wrapper, you can e.g. suppress Exceptions or enhance the functionality of the JDBC driver in order to get it to work.
      If you want to write such a wrapper on your own, have a look at the workaround in SOL-195, if you want to see how we have done this for a Hive JDBC driver.

      Show
      Note: This solution is no longer maintained. For the latest information, please visit our Knowledge Base: https://community.exasol.com/t5/connect-with-exasol/exaloader-3rd-party-jdbc-requirements-for-import-and-export/ta-p/484 ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Background  Requirements: a license which includes the extra database feature called "Generic JDBC connections" a JDBC data source which is reachable by all cluster nodes an appropriate JDBC driver uploaded and configured in the cluster via EXAoperation  When using the JDBC driver in IMPORT or EXPORT commands, you get error messages like [42636] ETL-5402: JDBC-Client-Error: Exception while disconnecting: Method not supported (Session: 1484043015261801495)  Explanation  When IMPORTing data from JDBC sources, EXAloader requires that the following methods are implemented by the JDBC driver. java.sql.Connection void setAutoCommit(boolean autoCommit) Statement createStatement() PreparedStatement prepareStatement(String sql) void rollback() void close() java.sql.Statement void setFetchSize(int rows) ResultSet executeQuery(String sql) void close() java.sql.PreparedStatement ResultSetMetaData getMetaData() java.sql.ResultSetMetaData int getColumnCount() int getColumnType(int column) String getColumnName(int column) java.sql.ResultSet ResultSetMetaData getMetaData() boolean next() long getLong(int columnIndex) double getDouble(int columnIndex) BigDecimal getBigDecimal(int columnIndex) String getString(int columnIndex) Date getDate(int columnIndex) Timestamp getTimestamp(int columnIndex) Clob getClob(int columnIndex) boolean getBoolean(int columnIndex) boolean wasNull() void close() When EXPORTing data into JDBC sources, EXAloader requires that the following methods are implemented by the JDBC driver. java.sql.Connection void setAutoCommit(boolean autoCommit) Statement createStatement() PreparedStatement prepareStatement(String sql) void rollback() void commit() void close() java.sql.Statement int[] executeBatch() boolean execute(String sql) void close() java.sql.PreparedStatement ParameterMetaData getParameterMetaData() void setLong(int parameterIndex, long x) void setDouble(int parameterIndex, double x) void setString(int parameterIndex, String x) void setDate(int parameterIndex, Date x) void setTimestamp(int parameterIndex, Timestamp x) void setBoolean(int parameterIndex, boolean x) void setNull(int parameterIndex, int sqlType) void addBatch() java.sql.ParameterMetaData int getParameterCount() int getParameterType(int param) Additional Notes In order to use a JDBC driver that doesn't support all required functions, you can write a wrapper for it; in that wrapper, you can e.g. suppress Exceptions or enhance the functionality of the JDBC driver in order to get it to work. If you want to write such a wrapper on your own, have a look at the workaround in SOL-195, if you want to see how we have done this for a Hive JDBC driver.
    • Category 1:
      ETL / Data Integration

      Attachments

        Activity

          People

          • Assignee:
            CaptainEXA Captain EXASOL
            Reporter:
            CaptainEXA Captain EXASOL
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: