S3 file export ability
closed
Oren Goldberg
I want my admin users to be able to generate reports on-demand. I'd like to follow the steps here:
so that I can generate a csv and export it to cloud storage. If this is already possible, please let me know how to set.
John Kennedy
closed
Clean card created https://neo4j-aura.canny.io/feature-requests/p/s3-file-export-utilising-apoc-to-allow-admin-to-download
Sameer Gijare
PLease have a look at policy tool and set appropriate permissions
Oren Goldberg
Sameer Gijare: are you responding to me, or advising the Aura team on how to build this feature? If you are responding to me, then permissions is not the problem. It's an issue with Aura. We are not able to set
apoc.export.file.enabled=true
and we also need the right plugins.Sameer Gijare
Oren Goldberg: Exporting to S3
By default exporting to S3 is disabled. We can enable it by setting the following property in apoc.conf:
apoc.conf
Properties
Copy to Clipboard
apoc.export.file.enabled=true
If we try to use any of the export procedures without having first set this property, we’ll get the following error message:
Failed to invoke procedure: Caused by: java.lang.RuntimeException: Export to files not enabled, please set apoc.export.file.enabled=true in your neo4j.conf
Just by setting this property to true, export to S3 won't be enabled. In addition you need to do things mentioned below
Using S3 protocol
When using the S3 protocol we need to download and copy the following jars into the plugins directory:
aws-java-sdk-core-1.11.250.jar (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-core/1.11.250)
aws-java-sdk-s3-1.11.250.jar (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-s3/1.11.250)
httpclient-4.4.8.jar (https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.4)
httpcore-4.5.4.jar (https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.8)
joda-time-2.9.9.jar (https://mvnrepository.com/artifact/joda-time/joda-time/2.9.9)
Once those files have been copied we’ll need to restart the database.
Exporting to S3 can be done by simply replacing the file output with an S3 endpoint. The S3 URL must be in the following format:
s3://accessKey:secretKey[:sessionToken]@endpoint:port/bucket/key (where the sessionToken is optional) or
s3://endpoint:port/bucket/key?accessKey=accessKey&secretKey=secretKey[&sessionToken=sessionToken] (where the sessionToken is optional) or
s3://endpoint:port/bucket/key if the accessKey, secretKey, and the optional sessionToken are provided in the environment variables
Memory Requirements
To support large uploads, the S3 uploading utility may use up to 2.25 GB of memory at a time. The actual usage will depend on the size of the upload, but will use a maximum of 2.25 GB.
Thanking you
Yours faithfully
Sameer SG
Oren Goldberg
Sameer Gijare: I'm a little confused. I know how to do those things on my local or on a vm, but are you able to complete any of those steps on Aura, specifically? If so, can you explain how you access apoc.conf or install jar files on Aura?
Sameer Gijare
Oren Goldberg: Actually you can deploy to aura from local setup through admin commands. Please have a look at admin console and commands like neo4j-admin.
Kamil Mroczek
Sameer Gijare: I just looked through all the docs for Neo4j admin (https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin/) and couldn't find any commands that look like they could copy jar files. Could you be more specific in which command you are speaking about? Thanks!
John Kennedy
Sameer Gijare: I think this card has become a bit confusing for folks to follow, though I appreciate your input.
I'll close this card, but have created a new card which is a clean start/thread.
The goal is to capture the request succinctly for the Aura PM team.