I will write it up as a knowledge base article.
The gist of it is:
if you have an directory with csv files, named: data1.csv to data1000.csv
You can use
UNWIND range(1,1000) AS id
*LOAD CSV WITH HEADERS FROM "file:///data"+id+".csv" AS row*
MATCH (a:Person {id:row.from})
MATCH (b:Person {id:row.to})
CREATE (a)-[:SENT]->(:Transfer {amount:toInt(row.amount), date:
row.date})<-[:RECEIVED]-(b)
On Sat, Mar 25, 2017 at 8:31 PM, Fares <[email protected]> wrote:
> Is there any tuturial that could help me to do so!!
>
> On Saturday, March 25, 2017 at 5:30:34 AM UTC+3, Michael Hunger wrote:
>>
>> You can iterate over a list or range with unwind
>> And the load csv of the constructed urls
>>
>> Von meinem iPhone gesendet
>>
>> Am 25.03.2017 um 00:43 schrieb Fares <[email protected]>:
>>
>>
>> Hi,
>> how can I load multiple csv files in a directory to neo4j with a single
>> load.
>>
>> The following is the query that I am using in order to load one cvs file:
>>
>> LOAD CSV WITH HEADERS FROM "file:/file1.csv" AS ROW FIELDTERMINATOR ';'
>>
>> I have a folder with 50 cvs files which has the same format I need to
>> load all to neo4j with one load
>>
>> Regards
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.