I'm trying to import a table from a SQL Sever DB to Bigquery. This table has a Datetime column that I've mapped with Bigquery DATETIME. I'm using Dataflow to ingest the table with default template (JDBC to Bigquery).
This is the connection string:
jdbc:sqlserver://<hostIP>:1433;instanceName=SQLSERVER;databaseName=<dbName>;encrypt=true;trustServerCertificate=true;
I've also added user and pwd (my credentials) in the job's parameters.
But Dataflow gives me the following error:
Error message from worker: java.lang.ClassCastException: class java.sql.Timestamp cannot be cast to class java.time.temporal.TemporalAccessor (java.sql.Timestamp is in module java.sql of loader 'platform'; java.time.temporal.TemporalAccessor is in module java.base of loader 'bootstrap')
com.google.cloud.teleport.templates.common.JdbcConverters$ResultSetToTableRow.mapRow(JdbcConverters.java:157)
com.google.cloud.teleport.templates.common.JdbcConverters$ResultSetToTableRow.mapRow(JdbcConverters.java:115)
com.google.cloud.teleport.io.DynamicJdbcIO$DynamicReadFn.processElement(DynamicJdbcIO.java:388)
I've also tried to map the datetime column with the Bigquery TIMESTAMP datatype, but I've got the same error.
It's not a connection problem, because I've tried to read other columns (except the datetime column) and the dataflow job works.
What do I have to do? What's the problem?
I'm using com.microsoft.sqlserver.jdbc.SQLServerDriver
as JDBC Driver name and I've downloaded from Maven the jar version mssql-jdbc-11.2.1.jre8.jar
.