I have inherited taking over and supporting and ArcSDE GIS database. We have a process that we must do every 6 months to export certain features from the ArcSDE database into shape files so that they can be imported into a Smallworld GIS data. Yeah, I know. Why is our company using two different GIS systems? Don't ask. This was already in place before I even got involved with all of this.
In any case, we have a set of Python scripts that are being used to join shape files to feature classes in the GIS database. We run the Python scripts via ArcMap via the Geoprocessing->Python console.
However, it only works if we log into our GIS server and run ArcMap from there. If we attempt to do this from outside the GIS server, then the resulting output shape file has the right number of records, but all the attributes are either zero (for number attributes) or null (for text attributes). Again, running this in ArcMap 10.0 sp4 on the ArcGIS server works. Running it from ArcMap 10.0 sp4 on say my local machine, which has access to the data and I can bring it up, results in the exported shape file having no attribute values.
My other question is, I don't understand all of the parameters passed into the arcpy.FeatureClassToFeatureClass_conversion function.
Here is an example from the script:
arcpy.AddJoin_management("AERIALTAP","STATUS","TGIS.AE_STATUS","VALUE","KEEP_ALL") arcpy.AddJoin_management("AERIALTAP","LOCATION_S","TGIS.AE_LOCATION_SOURCE","VALUE","KEEP_ALL") arcpy.FeatureClassToFeatureClass_conversion("AERIALTAP","C:\TGIS\Final","AERIALTAP","#","ID ID true false false 9 Long 0 9 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.ID,-1,-1;X X true false false 19 Double 10 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.X,-1,-1;Y Y true false false 19 Double 10 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.Y,-1,-1;REGION REGION true false false 4 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.REGION,-1,-1;MAINT_RESP MAINT_RESP true false false 4 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.MAINT_RESP,-1,-1;OBJECTID OBJECTID true false false 19 Text 0 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.OBJECTID,-1,-1;STATUS STATUS true true false 50 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,TGIS.AE_STATUS.DESCRIPTION,-1,-1;LOCATION_S LOCATION_S true true false 50 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,TGIS.AE_LOCATION_SOURCE.DESCRIPTION,-1,-1","#")
I understand what the join calls are doing.
I understand the first three parameters into the conversion call (input feature class, output directory, output feature class name). The rest I have some sort of idea, but not completely sure. It definitely looks like it's mapping the input feature column to an output feature column. The "#" seems to be a definition of a delimiter between fields, but the rest confuses me.
I've searched the ArcSDE web site and nothing is very clear about it. I have yet to find an example like what I have.
Any help would be appreciate.
If I do just this it works, but that's without any joins defined:
This works. But once I enter the field mapping and the joins, forget it. It won't work unless I'm on the production ArcSDE GIS server.