Hello @Vijay Rudrasamudram
One possible solution to this issue is to use Azure Data Factory's Mapping Data Flows to transform the data before copying it to Cosmos DB. You can use the Derived Column transformation to convert the geometry data into a format that Cosmos DB can recognize.
Here's an example of how you can use the Derived Column transformation to convert the geometry data into a format that Cosmos DB can recognize:
- Add a Derived Column transformation to your Mapping Data Flow.
- In the Derived Column transformation, add a new column and use the following expression to convert the geometry data into a format that Cosmos DB can recognize:
toString($geometryColumn.STAsText())
Replace$geometryColumn
with the name of your geometry column. - Map the new column to the corresponding column in your Cosmos DB sink. This should allow you to copy the geometry data from Azure SQL to Cosmos DB and run geospatial queries on it.
That should help you.
I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.