I am trying to write an embedded javascript code in an OBIEE report. Basically the idea of the report is to take tabular data, (rows and columns) into the report and have the report provide a way to extract user specified columns from it and download resulting data in CSV or Excel file. I'm trying to do this by storing data as an array of objects. So something like this:-
[
{'column1':'Entry1','column2':'Entry2',...}
,{'column1':'Entry1','column2':'Entry2',...}
,....
]
Problem is I'm get a C-runtime error (std::bad_alloc) which I'm assuming is because of running out of memory because it works when I take in less number of rows. The expected data is to be a maximum of about 200 columns (could be empty or non empty) and 1-2 million rows. What is the most memory efficient way to store such data, one copy of full data and then one copy of data with only the required columns? I can't post exact code here due to security reasons as it's on a work laptop on secure server.