How can I import Zip/Tar/GZ compressed files

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.

Hey..

could you please share your query which not creating Nodes and relationship to help you better ?

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

Please use below apoc procedure for zip load

CALL apoc.load.csv("url/mycsv.zip!mycsv.csv")
3 Likes

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!

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;

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.

Try

Somehow you need to unzip it

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.