I am facing an issue while appending the feature class to ArcSDE feature class.

All the I am trying to append the gdb feature classs data, I can see that the geometry is either changed and some cases they are NULL. Here is the code which I tried.

    arcpy.CopyFeatures_management(inputTable, str.format("{0}\\{1}",GdbPath, "FeatureTempTable"))
    arcpy.MakeFeatureLayer_management (str.format("{0}\\{1}",GdbPath, "FeatureTempTable"), str.format("{0}\\{1}",GdbPath, "FeatureTempTableLayer"))

     arcpy.SelectLayerByAttribute_management(str.format("{0}\\{1}",GdbPath, "FeatureTempTableLayer"),  "NEW_SELECTION", "OPTYPE='I'")
    if int ((arcpy.GetCount_management(str.format("{0}\\{1}",GdbPath, "FeatureTempTableLayer"))).getOutput(0))>0:

        arcpy.CopyFeatures_management (str.format("{0}\\{1}",GdbPath, "FeatureTempTableLayer"), str.format("{0}\\{1}",tempGdbPath, "TempTable"))
      #In the Append below the shape is getting corrupted and sometimes becoming Null
        arcpy.Append_management(str.format("{0}\\{1}",GdbPath, "TempTable"), outputTable, "NO_TEST")

In Geodatabase I checked the shapes are good and even used the SHAPE@WKT in gdb. It seems good. What I am trying is to select all the data in the feature class in the gdb where OPTYPE is I, are selected and appended to the SDE feature class in Oracle database.

What should I do?

  • SDE is auto-validating for geometries, SDE will not accept bad or empty geometries, run Repair Geometry resources.arcgis.com/en/help/main/10.1/index.html#//… with delete_null = 'DELETE_NULL' on your input data before appending or SDE will keep rejecting the append. Dec 16 '18 at 22:46
  • 1
    There's probably something far more complicated happening than your question suggests. While shapefile can have corrupt geometries, file geodatabase cannot, so there may be a spatial reference incompatibility or other subtle error causing failure. Note that some upload mechanisms are more reliable than others, and 10.1 had issues that were fixed by 10.2, 10.3, 10.4, 10.5, and 10.6 series releases. This sort of question is best addressed through Tech Support, but 10.1 is long retired and 10.2.0/1/2 is about to be retired, so reproduction is going to be a challenge.
    – Vince
    Dec 16 '18 at 23:44
  • hey Vince, I have checked and found the spatial Reference is same as WGS 1984 in both the gdb and the SDE and the I am using ArcGis 10.2.1.
    – royan
    Dec 17 '18 at 8:12
  • I even ran the Repair Geometry before using the append but still I can see the features have NULL SHAPE.LEN and SHAPE.AREA
    – royan
    Dec 17 '18 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.