Hi Bill,
There are a number of cases where specifying an ORDER BY doesn't work in a way that's intuitive. If you add a sort: "RowId" to the config object you're passing in, you should get the ordering you want.
Thanks,
Josh |
Hi Bill,
Ah, yes, sorry for jumping to the wrong diagnosis.
In general, I don't recommend relying on particular column ordering. For example, in many cases, the server will include additional columns in the results (such as primary key or other values used to general URLs and other types of metadata). You may be able to specify a list explicitly with the "columns" property to tweak the ordering, but that may not be completely stable either. This is a byproduct of the fact that we're not executing the SQL you pass to the server directly against the database, as you might be used to from JDBC or other database APIs.
Instead, I'd recommend iterating to find columns based on their names. The ordering for each row should be stable within a given response from the server.
Thanks,
Josh |
Yikes! This might require me to take a different strategy once I get over 100 columns in the matrix. I guess I could relegate the matrix analysis to R, calling it from JS which seems to be possible, but I wanted to stay in JS given the interactive analysis and visualization I am doing on the matrix. Thanks. |