Open jwebster-LANL opened 1 year ago
@jwebster-LANL, hmmm. I think you were the last person to modify get_wfdisc_rows
, so I haven't made any changes there. Can you share what you mean by "sorted with columns in alphabetical order"? It looks like your query would return a list row instances with column attributes like wf.sta
and wf.dfile
, which aren't ordered. Are you saying that when you do something like print(*wf)
, the correct order isn't preserved?
If you do a query like..
wfs = database.query_db(session, tables, start_time=start_time, end_time=end_time, sta=sta, cha=cha, return_type='wfdisc_rows')
print(wfs[0])
The wfdisc row lists come out ordered such that the attributes are in alphabetic order, as opposed to the field order as described in the link above
python 3.9.16 sqlalchemy 1.4.39 pisces 0.4.2 (from github) pyqt 5.15.7
let me know what else you might need
When I upgrade to sqlalchemy 2.*, this problem goes away. I'm currently trying to find the SQLAlchemy version at which this behavior changed...
...crud, it appears to be a problem with all of SQLAlchemy 1.4! Would that be disruptive to you if we were sqla>1.4?
A (new) error popped up in infraview that is related (i think) to pisces. I had programmed infraview's database waveform acquisition assuming the wfdisc rows had a field order as given in https://nappe.wustl.edu/antelope/css-formats/wfdisc.htm This has worked up until recently when it seems the wfdisc rows I've been getting back from pisces have the fields sorted in alphabetic order. The code snippit I've been using is:
I checked and the result of the query is sorted with columns in alphabetical order.
I don't see anything in pisces that would cause this...does anyone have an idea about changed?