Is it possible to move a feature class with arcpy from one dataset to another?
There is this thread:
That talks about the drag and drop option. There is a code example but it does not look like a working solution.
There is also this thread:
It talks about using Feature Class to Geodatabase. But this appears to just create a new copy of the feature class in the target dataset.
Solved! Go to Solution.
You'll need to use copy and delete to perform a "move" operation like you describe. If the two datasets have different coordinate systems, you'll first need to project the data.
You'll need to use copy and delete to perform a "move" operation like you describe. If the two datasets have different coordinate systems, you'll first need to project the data.
As @BlakeTerhune says... any "move" isn't really a move, it is move-like but the details are hidden for most
Okay, that is what I feared. The feature class has a number of relationships, so it will be more work than just a straight forward copy and delete. I first have to delete the relationships and then rebuild them after. All doable...
On a side note, I wonder if Esri is really copying, deleting, and rebuilding relationships with ArcObjects. I suspect they are just tweaking the database metadata tables like updating the sde.gdb_items table. I am tempted to test in the dev environment. But it is too risky when I go to production 😒
Hi
If you do not want to move relates then the best way is to create identical new feature class at target db then use Append to transfer data only.
Then if you Delete from source db the relations will be deleted but not the tables that the relations pointing to.
Right Thanks
Hi,
did you tried to check your theory? any results?
I did not. I chickened out. I needed a process that I could use in production. So, I was risk risk-averse. Let me know if you give it a go 🙂