Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-27-2020 11:25 PM
Hi,
I have a use case to import .zip/.tar/.gz files from S3 to Neo4j.
I tried with Import CSV as this not works. Its reading the file but nothing is created as Nodes/Relationships.
Helo REquired on this.
01-27-2020 11:31 PM
Hey..
could you please share your query which not creating Nodes and relationship to help you better ?
01-27-2020 11:38 PM
USING PERIODIC COMMIT
LOAD CSV with headers FROM "my-aws-s3-file-path with keys" as node
CREATE (n:V1ZIPBRAND { brandName: node.brandName});
This is the query I tried and neo4j able to read and not throwing error, but seems like its not creating any nodes.
If possible, plz provide me the query we can use for importing zip/tar files
01-28-2020 01:07 AM
Please use below apoc procedure for zip load
CALL apoc.load.csv("url/mycsv.zip!mycsv.csv")
01-29-2020 02:14 AM
Thanks.
Can we load Zip/ Tar using LOAD CSV command in Neo4j from cypher shell??
I tried loading CSV & GZ, however same not working for TAR.GZ / TGZ!
01-31-2020 02:01 AM
Thanks 12kunal34.
If we can load only via apoc.load.csv, how we can load different compressed formats to neo4j? (zip/tar/gz)
Since in production environment, generally we are going to deal with bugger files and it can be load from S3, so how can we use apoc methods to load bigger compressed file formats from S3?
If possible, plz provide me a sample command for my understanding;
03-11-2020 02:13 AM
Try
Somehow you need to unzip it
03-11-2020 12:44 AM
sounds like you will need a shell script or Perl script. You can pipe a compressed file with zcat or gzcat to and cut it up.
03-11-2020 05:05 AM
If you are comfortable with Python this script does what you want completely.
Update the yaml configuration file with file names and cypher script, the python script can ingest the data in chunks.
All the sessions of the conference are now available online