Add table_histogram endpoint#677
Open
will-moore wants to merge 3 commits into
Open
Conversation
Member
|
The time to calculate a histogram on demand will directly depend on the number of rows in the table and likely won't be sustainable for tables with millions of rows, which we are seeing regularly now. Our strategy is to calculate column statistics for most numeric columns at the time of table creation and store them in the table metadata (The
All custom metadata fields are already returned via the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a histogram functionality in
omero-paradeand now I also need it foriviewer(ome/omero-iviewer#532), so it makes sense for this to go intoomero-web.This endpoint behaves similarly to the existing OMERO.table
sliceendpoint e.g./webgateway/table/FILE_ID/slice/?columns=0&rows=0-100and wraps thetable_slice()for loading the data, then generates a histogram using numpy and returns the result.By default, we use ALL the rows to generate the histogram.
Since we don't want to have load the table twice (to get the row-count before passing the
rows = 0-row_count-1totable_slice(), I have updated thetable_slice()to allowrows=*(no change on max amount of data permitted).So you can now do
/webgateway/table/FILE_ID/slice/?columns=0&rows=*Histogram supports the
binsrequest parameter (int or string) - behaves as described at https://numpy.org/devdocs/reference/generated/numpy.histogram.htmlSample response to
/webgateway/table/15908/histogram/?columns=2,3on merge-ci