You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not having any quotes around any value. Output looks the same as when quotes: 'none'
How to Reproduce the Problem
Test the apoc.export.csv.query quote issue with config stream: true, quotes: 'ifNeeded'
Simple Dataset (where it's possibile)
//Insert here a set of Cypher statements that helps us to reproduce the problem
WITH ["Whole Bean/Teas", "Beverages", "Add-ons", "Food", "Merchandise"] as list
UNWIND list as item
MERGE (g:Group {group: item});
Steps (Mandatory)
Create the sample data set
Run the following query:
WITH "MATCH (group:Group)
WITH collect(group) AS groups
WITH groups, range(0, size(groups) - 1) AS ordinal_positions
UNWIND ordinal_positions AS id
WITH id+1 as group_id, groups[id] as group
return group_id, group.group as product_group" AS query
CALL apoc.export.csv.query(query, null, {stream: true, quotes: 'ifNeeded'})
YIELD data
RETURN data;
Screenshots (where it's possibile)
Specifications (Mandatory)
Currently used versions
Versions
OS:
Neo4j: Aura
Neo4j-Apoc: Aura
The text was updated successfully, but these errors were encountered:
I've looked into it now and this is the expected behavior of using 'ifNeeded'. It escapes characters such as commas and not the column as a whole. Alternatively, you could use 'always' which puts all values in quotation marks and would get you the following result:
That turns everything into strings, including integer values, dates, and so on. I was expecting the 'if-needed' option to not turn integers and other non-string data types into strings. 😕
Expected Behavior (Mandatory)
Should produce a CSV that only has quotes around the string values.
Expected following output:
Actual Behavior (Mandatory)
Not having any quotes around any value. Output looks the same as when quotes: 'none'
How to Reproduce the Problem
stream: true, quotes: 'ifNeeded'
Simple Dataset (where it's possibile)
Steps (Mandatory)
Screenshots (where it's possibile)
Specifications (Mandatory)
Currently used versions
Versions
The text was updated successfully, but these errors were encountered: