Databricks throwing error "SQL DW failed to execute the JDBC query produced by the connector." while pushing the column with string length more than 255
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2019 11:47 AM
I am using databricks to transform the data and than pushing the data into datalake.
the data is getting pushed in if the length of the string field is 255 or less but it throws following error if it is beyond that.
"SQL DW failed to execute the JDBC query produced by the connector.
Underlying SQLException(s): - com.microsoft.sqlserver.jdbc.SQLServerException: HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: HadoopSqlException: String or binary data would be truncated. [ErrorCode = 107090] [SQLState = S0001"
I am using following code to push the data into Datawarehouse
testdf.write
.format("com.databricks.spark.sqldw") .
option("url", sqlDwUrlSmall) .
option("dbtable", "dbo.testAddress") .
option( "forward_spark_azure_storage_credentials","True")
.option("tempdir", tempDir)
.mode("overwrite")
.save()
This table has just one column and the length of this field is 4000.