Gaffer icon indicating copy to clipboard operation
Gaffer copied to clipboard

Refactor ToOpenCypherCsv and ToCsv

Open p3430233 opened this issue 2 years ago • 1 comments

This will change the way how the current ExportCSV PR works gh-2675. In place of a a new operation handler for each new CSV format, the new method will instead the utilise the current operation ToCsv and its handler and will require an additional helper object that will determine the CSV format.

p3430233 avatar Aug 02 '22 10:08 p3430233

As explained, https://github.com/gchq/Gaffer/pull/2704 added an Operation called ToOpenCypherCsv. This isn't a very extensible design for adding new Csv formats though, so instead ToCsv should be refactored. Ideally, it should keep its current functionaility of user defined fields as well as supporting pre-exiswting formats. These formats could be implemented as generators. An example OperationChain would look like: GetElements -> ToCsv(Neo4jFormat) -> ExportToLocalFile

t92549 avatar Aug 03 '22 12:08 t92549

Fixed by https://github.com/gchq/Gaffer/pull/2751

t92549 avatar Oct 13 '22 13:10 t92549