Select to view content in your preferred language

append issue - model builder vs python

576
3
05-17-2013 08:11 AM
VadivelanPalanichamy
Deactivated User
Hi,

I am trying to append a feature class from fgdb to sde geodatabase.

I created the model builder with append tool, everything working fine.. But after I export the same as python, while executing I am getting the following error.

Error 000732: Target Dataset: Dataset Database connections\schemaowner.sde\schemaowner.featureclass

does not exist or not supported.

Could you help me on this, since model builder is working, but the exported python throwing error, any other lines i have to add.

thanks.
Tags (2)
0 Kudos
3 Replies
MichaelVolz
Esteemed Contributor
What version of ArcGIS are you working with?

Can you post your code (with code block please)?
0 Kudos
VadivelanPalanichamy
Deactivated User
Hello Mike,

It is ArcGIS 10.1 Sp1 in Windows 2008 machine.   I tried multiple times, the python code is not working, getting the same error.  I verified the same with different fc.

import arcpy


# Local variables:
inputFC = "inputFC"
SchemaOwner_sdeFC = "Database Connections\\SchemaOwner.sde\\SchemaOwner.sdeFC"

# Process: Append
arcpy.Append_management("inputFC", SchemaOwner_sdeFC, "NO_TEST", "STATUS \"Status\" true true false 1 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,Status,-1,-1;SCORE \"Score\" true true false 2 Short 0 5 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,Score,-1,-1;MATCH_TYPE \"Match_type\" true true false 2 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,Match_type,-1,-1;SIDE \"Side\" true true false 1 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,Side,-1,-1;X \"X\" true true false 8 Double 8 38 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,X,-1,-1;Y \"Y\" true true false 8 Double 8 38 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,Y,-1,-1;MATCH_ADDR \"Match_addr\" true true false 135 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,Match_addr,-1,-1;BLOCKL \"BlockL\" true true false 15 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,BlockL,-1,-1;BLOCKR \"BlockR\" true true false 15 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,BlockR,-1,-1;ARC_STREET \"Street or Intersection\" true true false 60 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,ARC_Street,-1,-1;ARC_CITY \"City\" true true false 40 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,ARC_City,-1,-1;ARC_STATE \"State\" true true false 20 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,ARC_State,-1,-1;ARC_ZIP \"ZIP\" true true false 12 Text 0 0 ,First,#,E:\\ESRI\\work\\work.gdb\\inputFC,ARC_ZIP,-1,-1", "")
0 Kudos
MichaelVolz
Esteemed Contributor
In the line
SchemaOwner_sdeFC = "Database Connections\\SchemaOwner.sde\\SchemaOwner.sdeFC"

In my scripts, this line would be referencing a .sde file.  I am not sure what a .sdeFC file is?

Also, can you provide the full path to the .sde file?  I found that the Database Connections syntax worked for ArcGIS v10.0, but for ArcGIS v10.1 I had to provide the full path for the script to accept the SDE connection file.

I hope this helps.
0 Kudos