I create a script to append data from feature class in FGDB to SDE (MS Sql DBMS). I use "no_test" on append.
Script works fine, data get appended, but no attributes are transfered, just geometry. When I run the command manually, or if I set target to be another FGDB, it works.
Does anybody experienced this before?
After you manually run the tool the way it works copy the Python snippet from the Results window and compare the code with what you are using in your script. I'm sure it will contain information on the field mapping.
It's probably related to the field mapping from the file geodatabase to the SDE database.
As Xander suggests, if you copy the Python snippet from ArcMap it will include the field mapping you need
field_mapping='a very long string of mapped attributes',
I don't think there is a problem in my field mapping. This are the reasons why:
I am wondering if it might be some issue with MS SQL. It is a first time I have experienced such a strange behaviour, and I did append many many times via scripting, however never against MS SQL.
I am using Sublime text 3 to execute my code. But I think I also tried directly from command prompt. I did this operation 1000 times before. Please notice, that all the features are appended to target FC, just all attributes have value NULL.
So I did some testing. Here is something interesting.
I have set up the input feature class in a way that I can append it with "TEST" value in "schema_type" parameter.
So it seems that there some kind of bug, when running append command from python script with "NO_TEST" as schema type against feature class in MS SQL SDE.
Anyone have any idea how to solve this issue?