Select to view content in your preferred language

ArcSDESQLExecute => FGDB

506
3
05-22-2013 12:03 PM
CharlesTilly
Deactivated User
I'd like to take the results from a ArcSDESQLExecute query and bulk load that into a file geodatabase.  Anyone know of a way to do that faster than using the InsertCursor?

Is the ArcSDESQLExecute.execute list castable to anything else like a FeatureSet or other ArcPy list? 

Regards,

Chuck
Tags (2)
0 Kudos
3 Replies
ChrisSnyder
Honored Contributor
What does your ArcSDESQLExecute query look like and what is it returning? A spatial view, table view?
0 Kudos
CharlesTilly
Deactivated User
It shouldn't matter should it?  The results of a ArcSDESQLExecute.excute is always going to be a list of lists isn't it?  A SQL statement against a table is going to return the same sort of list that one against a view does.  Correct?
I'd love to figure out how to get it to return a ref_cursor from a function if that is possible.
0 Kudos
ChrisSnyder
Honored Contributor
I asked, since the "best" way probably depends on what the rows contain (i.e is there Shape data?).

However, if you are looking for a Python-based solution, I'm not sure how you would get away from using an insert cursor, which the cursor kinda being the "lowest level" operator available.  Of course the new .da cursors (in v10.1) are much faster than the "old" cursors, so if you are running v10.1, that'd be the 1st thing I'd try.

If you were really handy, maybe you could use the new FGDB API, but that's above my head and I don't think there's a way to do it directly via Python.
0 Kudos