devinrsmith / deephaven-parquet-viewer

A browser-based Parquet file viewer
36 stars 2 forks source link

Is there a way to save in JSON or CSV? #20

Closed alberttwong closed 3 months ago

alberttwong commented 1 year ago

I was wondering if the viewer can save in JSON or CSV.

devinrsmith commented 1 year ago

Yes, there is an export / download to CSV option, but it looks like there's an upstream bug that is making it not available by default for iframes: https://github.com/deephaven/web-client-ui/issues/1337

To work around this, you can view the table in the ide, http://localhost:10000/ide/, and then there should be a "Download CSV" option in the menu options for the parquet_table.

I̶ ̶m̶a̶y̶ ̶b̶e̶ ̶a̶b̶l̶e̶ ̶t̶o̶ ̶g̶e̶t̶ ̶o̶u̶t̶ ̶a̶ ̶f̶i̶x̶ ̶f̶o̶r̶ ̶t̶h̶i̶s̶ ̶s̶o̶o̶n̶e̶r̶ ̶r̶a̶t̶h̶e̶r̶ ̶t̶h̶a̶n̶ ̶l̶a̶t̶e̶r̶,̶ ̶I̶ ̶w̶i̶l̶l̶ ̶l̶e̶t̶ ̶y̶o̶u̶ ̶k̶n̶o̶w̶.̶

Edit: I'm unable to fix this default without a fix from upstream, but the workaround I posted below should work for now.

devinrsmith commented 1 year ago

Actually, another workaround is to add the canDownloadCsv query param:

http://localhost:10000/iframe/table/?name=parquet_table&canDownloadCsv

although, I will be advocating that upstream remove this ability in the future (and download csv should be enabled by default).