microsoft / mssql-jdbc

The Microsoft JDBC Driver for SQL Server is a Type 4 JDBC driver that provides database connectivity with SQL Server through the standard JDBC application program interfaces (APIs).
MIT License
1.06k stars 426 forks source link

[BUG] bulk copy has lost support for spatial columns (geometry/geography) #960

Open ravenAtSafe opened 5 years ago

ravenAtSafe commented 5 years ago

Support for spatial columns was added (for us, thank you!) in https://github.com/Microsoft/mssql-jdbc/issues/533

Sadly it appears that when https://github.com/Microsoft/mssql-jdbc/issues/655 was fixed (also for us - I have regrets) by https://github.com/Microsoft/mssql-jdbc/pull/657 it killed the Bulk Copy support for spatial columns (we believe because VARBINARY columns are supported by Bulk Copy but spatial columns are not).

Creating repro sample code will take at least a little effort; I'll hold off on that until you say you need it. Hopefully it's pretty straightforward!

peterbae commented 5 years ago

Hi @ravenAtSafe, thanks for reporting this issue. The team is aware that geometry/geography datatypes are currently not supported for bulk copy. We will investigate if we can support this feature again without breaking the existing functionalities and let you know.

ravenAtSafe commented 5 years ago

Thanks @peterbae; we will stick with the preview driver for now.

karan-shell commented 3 years ago

Is there any scope for this enhancement in the near future?

ravenAtSafe commented 3 years ago

For what it's worth we ultimately upgraded to the latest driver and were able to convince bulk copy to handle geometry with only minimal tweaks - it looks like we just claim we are working with VARBINARY and all is well.

lilgreenbird commented 3 years ago

@karan-shell this enhancement is in our backlog it will be considered along with other bugs and features when we plan for the next semester. We take into consideration the severity of the bug and community demand for the feature when we do the triage so please upvote anything that you would like to see added to the driver.

Thanks