I'm working with SDE database connections and want to write a python script that will do the following:
So far truncate and delete row tools don't work.
My dilemma is very similar to this Need a script to replace data in a network dataset, which was posted 4 years ago.
Is everyone refreshing their data manually?
Solved! Go to Solution.
If you are really replacing your old data with a completely new dataset, you can use the Create Template From Network Dataset tool to create an XML template storing the network dataset schema, delete the network dataset, swap out your data, and then use Create Network Dataset From Template to re-create the network dataset referencing the new data. Then run Build Network to finalize it.
(These tools did not exist when that previous post was under discussion.)
If you are really replacing your old data with a completely new dataset, you can use the Create Template From Network Dataset tool to create an XML template storing the network dataset schema, delete the network dataset, swap out your data, and then use Create Network Dataset From Template to re-create the network dataset referencing the new data. Then run Build Network to finalize it.
(These tools did not exist when that previous post was under discussion.)