Hi,
I loaded attached csv file approx with 500000 rows and was trying to save result but it is somehow not saving the result in json file.
Could you please have a look and let me know how can we fix this issue?
Thanks,
Varun
Hello, Varun!
Thank you for reaching out to us.
We noticed that you did not attach the CSV file, yet we could reproduce the issue following your description using a similarly-sized file. While loading a CSV file, all the data is stored inside the report as JSON in the dataSource.data
property. When saving the report, it is stringified with the 500000 rows of inline data, which causes the saving failure due to exceeding the string size limit.
We recommend connecting to your data via URL instead of loading a local file to avoid this issue. This way, the report remains lightweight, as the URL would be saved in the report instead of a massive JSON array with data:
report: {
dataSource: {
type: "csv",
filename: "https://cdn.flexmonster.com/data/data.csv"
},
}
Below, you can find guides for connecting to JSON and CSV data via URL:
Due to the error being caused by a string size limitation, it cannot be fully resolved. However, our team will improve the error handling for this case in one of the future minor releases, ETA June 9th.
Please let us know if our suggestion was helpful.
Best regards,
Maksym
I tried to load csv via dataserver but it is showing blank page , Checked dataserver and index,it was also ok.
i used below code
<script type="text/javascript">
const pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true
});
const pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true,
report: {
dataSource: {
type: "api",
url: "http://localhost:9500",
index: "data"
}
},
licenseKey: "Z7HS-XCBC6C-4B3I40-6E5O26"
});
</script>
Hi,
I was able to load csv via data server, but when i try to save the result it does not save the data in the JSON. How could i save the JSON with data?
Thanks,
Varun
Hello, Varun!
Thank you for your reply.
Flexmonster does not support embedding the data when saving the report with an FDS data source. There are several reasons for it, involving the save feature design and data processing approach used in the Data Server.
Firstly, the report is deliberately saved with all configurations precisely as defined - this is a design choice to ensure that the visualization stays as accurate as possible after the report is opened. Embedded JSON data should not replace the FDS data source config, as this would mean a change in the data source type, which is a significant change for this case, particularly due to the reasons described below.
Secondly, FDS is a server-side data source that delegates data aggregation to the server side to manage large amounts of data. A new request is formed on every change in the report, like expanding or filtering data, and the data is loaded in parts. The component receives only the data it needs to visualize, and everything else remains on the server side, which gives a huge performance boost for working with big data. As a result, Flexmonster does not have the entire dataset loaded on the client when connected to FDS, making the data replacement impractical. Also, changing the FDS data source to an inline JSON would completely negate the performance benefits of having server-side data processing.
Finally, this approach makes saved reports lightweight, resulting in faster downloads and avoiding issues with string size limitations that caused the initially reported saving error.
In contrast, when you load a CSV or JSON file from your computer, the data must be saved inside the report. The browser can not reaccess your files later, so Flexmonster converts the file into JSON and stores it in the report to ensure it can be reloaded. In this case, saving the data as JSON is the only existing option.
Please let us know if our explanation helped you.
Best Regards,
Maksym