Select to view content in your preferred language

Insert data directly into table SQL Server

378
1
10-21-2024 01:52 AM
naveenbesri
Frequent Contributor

Hi,

I just want to check it out whether can we insert data including geometry directly using pyodbc into the table?

If yes can we see the data after insertion in ArcGIS Pro?

0 Kudos
1 Reply
CodyPatterson
MVP Regular Contributor

Hey @naveenbesri 

Using arcpy you can definitely do this, I typically need to create a SHAPE@ attribute that will come across as geometry in SQL. This will show up in its own column called shape and be of type geometry if it is in SQL Server at least. These changes show up immediately through ArcGIS Pro, sometimes a refresh is needed, but it is typically instant.

I would create a test feature layer through the enterprise geodatabase and give it a shot through there before changing any production data though.

Cody

0 Kudos