Select to view content in your preferred language

Exporting globalID and objectID to shp using geoprocessing tools - possible?

3482
4
04-10-2011 05:54 AM
yonatanrubinstein
Deactivated User
Hello,

I'm trying to export files from SDE to shp(shapefile). When I do it manually (Data>Export data), the globalID (GID) and ObjectID (OID) fields are exported to the shapefile. In contrast, when I use geoprocessing tools (such as Select or CopyFeatures) all fields are exported except the GID and OID.

Is there any way I can use the Geoprocessing tools (and\or Python) to export ALL fields including GID and OID???

(I'm using ArcGIS 9.3.1, and the manual way isn't good enough as I want to export a large amount of layers).
0 Kudos
4 Replies
IdrisPeiren
Emerging Contributor
Hi,

This problem is a known issue for years now and I'm still searching for a solution. I've tried every tool that involves exporting but none of them keeps the Objectid.
Have you been able to fix this problem yet?

Kind regards,

Idris Peiren
0 Kudos
MeghanKulkarni
Occasional Contributor

It's too late to respond reason I'm relatively new to GIS. I have found one workaround.

 

If we create a new attribute with data type as GUID instead of GlobalID and copy over the same data, it works.

 

It does not work in earlier case because GlobalID is Unicode Data Type in ArcGIS however in Enterprise GDB, SQL Server, for instance, it does not know to map from Unicode into the string (I guess ArcPy should internally convert GlobalID data type into nvarchar for say). Maybe something to look into with ArcPy's internal mapping code.

 

I hope this helps,

 

My Best,

MK

0 Kudos
yonatanrubinstein
Deactivated User
Hi,

This problem is a known issue for years now and I'm still searching for a solution. I've tried every tool that involves exporting but none of them keeps the Objectid.
Have you been able to fix this problem yet?

Kind regards,

Idris Peiren


Idris,

I did not find a solution - I just put it aside, as there is no solution as far as I know.
0 Kudos
MeghanKulkarni
Occasional Contributor

It's too late to respond reason I'm relatively new to GIS. I have found one workaround.

If we create a new attribute with data type as GUID instead of GlobalID and copy over the same data, it works.

It does not work in earlier case because GlobalID is Unicode Data Type in ArcGIS however in Enterprise GDB, SQL Server, for instance, it does not know to map from Unicode into the string (I guess ArcPy should internally convert GlobalID data type into nvarchar for say). Maybe something to look into with ArcPy's internal mapping code.

I hope this helps,

My Best,

MK

0 Kudos