Hello, I'm trying to carry a variable into an APOC export CSV query, like so:
with "test" as var1
with "with var1 return var1" // error here: Variable 'var1' not defined.
AS query
CALL apoc.export.csv.query(query, '/output/file.CSV', {batchSize: 5000})
YIELD file, source, format, nodes, relationships, properties, time, `rows`, batchSize, batches, done, data
RETURN file, source, format, nodes, relationships, properties, time, `rows`, batchSize, batches, done, data;
I want to be able to return 'test' here.
However, I get the error: Variable 'var1' not defined.
Is there a way to accomplish this? I am trying to use variables to run a CSV export multiple times, based on the variables.
Thank you!