msgraph-sdk-java icon indicating copy to clipboard operation
msgraph-sdk-java copied to clipboard

SystemOutOfMemoryErorr while getting table range using Microsoft graph Table API

Open PanmandHarshad opened this issue 3 years ago • 2 comments

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. Screenshot 2022-09-15 at 5 57 48 PM

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();

PanmandHarshad avatar Sep 19 '22 11:09 PanmandHarshad

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?

ramsessanchez avatar Sep 26 '22 21:09 ramsessanchez

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?

PanmandHarshad avatar Sep 28 '22 11:09 PanmandHarshad

Hi @ramsessanchez, I'm using 5.36.0 version of SDK. But I'm still facing the same issue for 15k records.

nany256 avatar Nov 18 '22 07:11 nany256

we should investigate this on the newer previews.

ddyett avatar Mar 08 '23 23:03 ddyett

@ddyett we've unfortunately "ported" this issue. But it should be an easy fix. I've logged an issue to address it

baywet avatar Mar 09 '23 13:03 baywet

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.

baywet avatar Feb 08 '24 13:02 baywet