Join GUID field to shapefile via arcpy

508
2
Jump to solution
10-18-2017 05:04 AM
MKF62
by
Occasional Contributor III

So, I understand that GUID fields aren't supported by shapefiles, and when you do a join manually in ArcMap (right click layer in TOC > join), it converts the GUID field to a string to join a table with a GUID to a shapefile. I figured it would do the same thing in arcpy as it does in ArcMap when using JoinField_management, but instead the tool fails. Is there any way to have that GUID field convert to string so I can join it with my shapefile? The only way I can think to do it is to copy the SDE database and change the GUID field to string field before joining it with my shapefile in arcpy, but I really want to avoid doing that as it isn't practical.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

you would have to include add_field management and calculate_field management into your script to basically do what you know you can do manually before doing the join

View solution in original post

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

you would have to include add_field management and calculate_field management into your script to basically do what you know you can do manually before doing the join

0 Kudos
MKF62
by
Occasional Contributor III

Thanks, although less stream-lined than I'd like, that'll work and is probably the best way.

0 Kudos