2
votes

I am inserting rows into Snowflake database using simple jdbc. I am doing a "executeUpdate" in a loop. I see that rows are inserted, but this error is reported

[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: TIME_OUTPUT_FORMAT
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: CLIENT_DISABLE_INCIDENTS
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: JS_DRIVER_DISABLE_OCSP_FOR_NON_SF_ENDPOINTS
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: JS_DRIVER_ENABLE_COMPRESSION
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: ODBC_ENABLE_COMPRESSION
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: CLIENT_SESSION_KEEP_ALIVE
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: JDBC_USE_JSON_PARSER

I am not sure what these error are ... and whether they can be ignored or not.

Also I see that the snowflake JDBC driver does not support executeBatch and executeLargeBatch. So how do I upload large number of rows from a Java application?

Also does the JDBC driver support transactions?

1

1 Answers

2
votes
  1. Regarding "[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata [error] INFO: unknown parameter: TIME_OUTPUT_FORMAT", these are INFO logs. It means that the driver doesn't handle those parameters. You can ignore them. We will change the behavior that these lines are not logged by default.

  2. We support executeBatch for PreparedStatement. So you can insert large number of rows through batch binding. executeLargeBatch is currently not supported, but we can add support for it easily if needed.

  3. Our JDBC driver supports transaction. By default a session will be started in auto commit mode. If you want to turn off auto commit, you can call the Connection.setAutoCommit method and then use commit() or rollback() to commit or roll back a transaction. A transaction is transparently started upon the first DML.