neodash icon indicating copy to clipboard operation
neodash copied to clipboard

Reports: Table CSV Export not formatted properly when using COLLECT(DISTINCT())

Open geoffinfosecpersona opened this issue 11 months ago • 3 comments

The exported CSV from Neodash differs from the exported CSV from the Neo4j Browser, with the Neo4j Browser export respecting lists as a single column, and the Neodash export treating list entities as individual columns.

In short, it looks like the CSV export process treats commas as delimiters, which causes issues when using a COLLECT(DISTINCT()) on tabular fields, as the lists generated by the COLLECT(DISTINCT()) have the entities in the list separated by commas.

To help us understand your issue, please specify important details, primarily:

  • NeoDash version: 2.4.3

  • Neo4j Database version: 5.17 Enterprise

  • Steps to reproduce

  • Create a Tabular Report

  • In the report, use a query to return multiple fields that returns multiple properties using COLLECT(DISTINCT)). Sample query using "Movies":

MATCH (n:Movie)
OPTIONAL MATCH (n)-[:ACTED_IN]-(b)
OPTIONAL MATCH (n)-[:DIRECTED]-(c)
OPTIONAL MATCH (n)-[:PRODUCED]-(d)
RETURN 
n.title AS `Movie Name`
, COLLECT(DISTINCT(b.name)) AS `Actors`
, COLLECT(DISTINCT(c.name)) AS `Directors`
, COLLECT(DISTINCT(d.name)) AS `Producers`
  • Export the CSV from the tabular report, and the columns won't line up with the exported values (instead of there being 4 columns total, each list entity will create its own column)

  • Expected behavior For the above query, there should be 4 columns in the CSV export

  • Actual behavior I believe the CSV export should have around 12 columns

geoffinfosecpersona avatar Mar 19 '24 12:03 geoffinfosecpersona