I am aware that I cannot use the sql_clause parameter on arcpy in-memory layers, the dataset must exist in a database. However, the program I have written must then write out a file every single time I run a network analyst problem (and subsequently delete it). I am working with tens of thousands or records, and half a dozen or so route solves per record. I need to reduce my iteration processing times as much as possible, and not having to write out a file every time would save a ton of time.
I am specifically trying to sort the junctions output from the copy traversed features method on a closest facility later, stored in-memory of course.
Any work-around would be much appreciated. Thanks!
I believe I understand your overall challenge, but I can't provide any specific feedback without knowing more about your data. Can you provide some examples or attach an extract of your data and explain what you are trying to do with the data?
Thanks for the quick response. I just realized something that I need to test, and I broke my program, so Im debugging at the moment. I’ll update you if I figure out the solution!
Okay, I was able to switch around my facilities/incidents and “travel_to/from” parameters to sort out in the order I needed and therefore didn’t have to worry about sorting again later.
Thanks for your help though!
Thanks for the help. I looked into Sort, but it write’s out another table to disc which I then have to read. I am trying to avoid writing to disc, same with generate near table.
I have also looked into a list comprehension as well, which I was able to get partly. I need to look into a bit more.