I have a table in azure databricks called prod.locations
that I am connecting to in ArcGIS Pro through an OLE DB Connection\Microsoft OLE DB Provider for ODBC Drivers. This table has a column called geometry_wkb
and another called geometry
that look like this in table view in ArcGIS Pro:
This is how the same columns look when I query them in databricks directly:
In this particular table there are about 200k records, but there are other tables with more that I would like to do a similar exercise with.
I'd like to be able to turn this table into a line feature class, and hopefully do this on a regular basis to always have fresh spatial data.
I've come across the FromWKB
ArcPy function, but I am having a hard time finding examples I can effectively backwards logic for my data given my novice ArcPy knowledge. I also get the feeling that FromWKB
is just one part of the process and won't create or insert all the records iteratively.
How/what should I be doing to reach my desired output?
geometry
column shows as WKT.) OLE/ODBC doesn't permit geometry, but a Direct Connect connection might (natively). Converting is as simple as creating a correctSpatialReference
(parameter toarcpy.FromWKB
orarcpy.FromWKT
), then using anarcpy.da.InsertCursor
to populate all columns in the target feature class.