<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="LOAD CSV WITH HEADERS FROM
  &quot;https://gist.githubusercontent.com/timmytofu/ba39ae1bf3669bd36ba3/raw/3be7510f487c50b64259bb3e0c1e68ace9f6af69/bad-neo-import.csv&quot;
  AS csv
CREATE (:Foo {fid: toInt(csv.id), thetext: csv.thetext});"><pre class="notranslate"><code class="notranslate">LOAD CSV WITH HEADERS FROM
  "https://gist.githubusercontent.com/timmytofu/ba39ae1bf3669bd36ba3/raw/3be7510f487c50b64259bb3e0c1e68ace9f6af69/bad-neo-import.csv"
  AS csv
CREATE (:Foo {fid: toInt(csv.id), thetext: csv.thetext});
</code></pre></div>
<p dir="auto">Strangely, if I add 0xD (the carriage return Windows puts before newlines) to the line above that starting with "" it works:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="LOAD CSV WITH HEADERS FROM
  &quot;https://s3.amazonaws.com/vfiles-sandbox/good-neo.csv&quot;
  AS csv
CREATE (:Foo {fid: toInt(csv.id), thetext: csv.thetext});"><pre class="notranslate"><code class="notranslate">LOAD CSV WITH HEADERS FROM
  "https://s3.amazonaws.com/vfiles-sandbox/good-neo.csv"
  AS csv
CREATE (:Foo {fid: toInt(csv.id), thetext: csv.thetext});
</code></pre></div>
<p dir="auto">(I had to put that on S3, gist scrubs the carriage return)</p>
<p dir="auto">This happens on 2.2.1, but not 2.2.0. Tested on Ubuntu 14.04.</p>
<p dir="auto">Related to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="26491929" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/1879" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/1879/hovercard" href="https://github.com/neo4j/neo4j/issues/1879">#1879</a>, but I'd like to ask for more holistic and general support for post-UNION processing, not just limiting/skipping/ordering.</p>
<p dir="auto">One way to look at it is very much like a <code class="notranslate">WITH</code> clause. Perhaps <code class="notranslate">UNION WITH</code> would thus be a good name for it, or maybe <code class="notranslate">UNION RESULT</code> to convey that you're now acting on the entire union'ed result.</p>
<p dir="auto">Our major use case is aggregating a stream of content, where that content is queried in different ways. The important point is: we want to process the content <em>after</em> aggregation, not <em>before</em>. Without this ability with today's <code class="notranslate">UNION</code>, we're less efficient in some cases, and outright buggy in others.</p>
<p dir="auto">To avoid making this description too long, I'll post an example of the problem in a comment, as well as a proposed syntax in another comment.</p>