Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Fix csv parsing function #367

Merged
merged 8 commits into from
Jun 7, 2021
Merged

Fix csv parsing function #367

merged 8 commits into from
Jun 7, 2021

Conversation

joshuali925
Copy link
Contributor

@joshuali925 joshuali925 commented May 14, 2021

Signed-off-by: Joshua Li [email protected]

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@joshuali925 joshuali925 marked this pull request as draft May 14, 2021 22:47
@joshuali925 joshuali925 marked this pull request as ready for review May 15, 2021 00:30
@joshuali925 joshuali925 changed the title Fix csv parsing function, switch json to csv library Fix csv parsing function May 15, 2021
@zhongnansu
Copy link
Member

Can we add test case for this?

@zhongnansu
Copy link
Member

Why CI is not triggered for this PR

@joshuali925
Copy link
Contributor Author

Can we add test case for this?

Added. Did we have memory issues with csv reports? I had to flatten the hits to take care of selecting columns like a.b.c from { 'a.b': { 'c': 'value' } }, this might increase memory consumption

@joshuali925
Copy link
Contributor Author

https://github.com/joshuali925/kibana-reports/actions check CI here, i think github is having problem with PR triggers

@joshuali925 joshuali925 self-assigned this May 17, 2021
@zhongnansu
Copy link
Member

Can we add test case for this?

Added. Did we have memory issues with csv reports? I had to flatten the hits to take care of selecting columns like a.b.c from { 'a.b': { 'c': 'value' } }, this might increase memory consumption

maybe, like this issue described. opensearch-project/reporting#34

@joshuali925
Copy link
Contributor Author

maybe, like this issue described. opensearch-project/dashboards-reports#34

Got it. I don't think the issue can be resolved by just optimize memory usage while generating csv. We'll have to introduce some kind of external storage for processing data. So this PR shouldn't affect that issue

@zhongnansu
Copy link
Member

maybe, like this issue described. opensearch-project/dashboards-reports#34

Got it. I don't think the issue can be resolved by just optimize memory usage while generating csv. We'll have to introduce some kind of external storage for processing data. So this PR shouldn't affect that issue

I think a hard limit on csv file size may be another approach, such as 10 MB

@zhongnansu
Copy link
Member

can we merge this in? @joshuali925

@joshuali925
Copy link
Contributor Author

missing an approval, @davidcui-amzn could you take a look please?

@joshuali925 joshuali925 merged commit 9b5b0a0 into opendistro-for-elasticsearch:dev Jun 7, 2021
zhongnansu pushed a commit to zhongnansu/kibana-reports that referenced this pull request Jul 1, 2021
* Fix csv parsing function, switch json to csv library

Signed-off-by: Joshua Li <[email protected]>

* Revert "Fix csv parsing function, switch json to csv library"

This reverts commit 6b3d88f.

* Fix csv parsing function

Signed-off-by: Joshua Li <[email protected]>

* Flatten nested results for csv

* Add test case for nested fields

Signed-off-by: Joshua Li <[email protected]>

* Use test data from sample_data_ecommerce

* Format code
zhongnansu pushed a commit to zhongnansu/kibana-reports that referenced this pull request Jul 1, 2021
* Fix csv parsing function, switch json to csv library

Signed-off-by: Joshua Li <[email protected]>

* Revert "Fix csv parsing function, switch json to csv library"

This reverts commit 6b3d88f.

* Fix csv parsing function

Signed-off-by: Joshua Li <[email protected]>

* Flatten nested results for csv

* Add test case for nested fields

Signed-off-by: Joshua Li <[email protected]>

* Use test data from sample_data_ecommerce

* Format code
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants