Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableWrapper rows clipped to 1000 #56

Closed
Rdornier opened this issue Mar 15, 2023 · 3 comments
Closed

TableWrapper rows clipped to 1000 #56

Rdornier opened this issue Mar 15, 2023 · 3 comments

Comments

@Rdornier
Copy link
Contributor

Rdornier commented Mar 15, 2023

Hello,

I've a problem dealing with TableWrapper. When I get a table from OMERO, the size of data (number of rows) are clipped to 1000 even if the table has more than 1000 rows. Strange thing : the rowCount indicates the correct number of rows.

image

Edit : I'm using 5.12.2 version of simple-omero-client

@ppouchin
Copy link
Member

Right. This is because the TablesFacility from the Java Gateway limits the number of rows retrieved to 1000 if no number is given.

I could retrieve the information and always load the whole table, but I think it would be wiser to follow what the OME team did and only provide one method to retrieve rows in a provided range and one method to get the basic info (with no data), or even just the number of rows. That would incite devs to check the size is "acceptable" before downloading a table.

@Rdornier
Copy link
Contributor Author

Ok, Thanks.
I didn't know about such limit for tables as well.
But is it possible to load the entire table from TableWrapper or is it only possible to get it using client.getGateway().getFacility(TableFacility.class).getTable() ?

provide one method to retrieve rows in a provided range and one method to get the basic info

Yes, it could be great to have a method in TableWrapper like createTable(first row, last Row) or createFullTable() or createTable(boolean fullTable)

@Rdornier
Copy link
Contributor Author

I still have an issue. I've written the code below

List<TableWrapper> tables = repoWrapper.getTables(client).stream().filter(e -> e.getName().contains(tableName)).collect(Collectors.toList());
            if(!tables.isEmpty()) {
                TableWrapper table = tables.get(0);
                TableData tableData = client.getGateway().getFacility(TablesFacility.class).getTable(client.getCtx(), table.getFileId(), 0, table.getRowCount(),
                        IntStream.range(0, table.getColumnCount()).toArray());
                return new TableWrapper(tableData);
            }

but getFileId() returns -1 and therefore the TableData is null.

Could you initialize TableWrapper with the file Id when we invoke repoWrapper.getTables() ?
Thanks

ppouchin added a commit that referenced this issue Mar 28, 2023
* Update pom.xml and maven.yml
* Fix wrong tag namespace being set when retrieved
* Fix #56 (incomplete tables)
* Fix another null exception when retrieving min positions
* Improve documentation for tables & ROIs (#57)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants