msgraph-sdk-java
msgraph-sdk-java copied to clipboard
SystemOutOfMemoryErorr while getting table range using Microsoft graph Table API
The table from Microsoft workbook/excel file contains more than 50k rows. Trying to retrieve the table data using Microsoft graph API (Get Table). Getting SystemOutOfMemoryErorr for table which contains more than 10K rows/records.
Now I decided to retrieve the data in chunk of 10k rows using worksheet API (Worksheet get range). For that trying to retrieve the table range address like Sheet1!B1:R11 using Microsoft graph table API, but here also I'm getting SystemOutOfMemoryErorr.

Expected behavior
All data of the table is to be returned in a single call.
Actual behavior
Getting SystemOutOfMemoryErorr for large table data. i.e. table data with more than 20K rows and 20 columns.
Steps to reproduce the behavior
Create a workbook table that contains more than 20k records and 20 columns. (every cell should have value). Retrieve the table data using Microsoft Graph API of java
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
WorkbookRange workbookRange = graphClient.me().drive().items("{id}").workbook().tables("{id|name}") .range() .buildRequest() .get();
Hi @PanmandHarshad, I have retried to reproduce your issue but I am not running into the same memory issue. What version of the SDK are you running at the moment. For context, I am running 5.36.0 and my table contains 20 columns with 32k rows each. Additional question, what do you mean when you say you wish for all the table data to be returned as a single cell?
Currently, I'm using the 5.20.0 version of SDK. Here 'All data of the table is to be returned in a single call.' I'm saying table data should available in a single call without pagination.
@ramsessanchez can you please try with more than 50K records?
Hi @ramsessanchez, I'm using 5.36.0 version of SDK. But I'm still facing the same issue for 15k records.
we should investigate this on the newer previews.
@ddyett we've unfortunately "ported" this issue. But it should be an easy fix. I've logged an issue to address it
Sorry for the late reply, we've been working hard to release a new major version of the SDK Since this is an issue with the older version, we'll be closing it for now. Please go ahead and try with this new version, if you're still facing issues, feel free to open a new issue.