Skip to content

Commit

Permalink
[NrNk9YvB] Reshapes import and export sections
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Jan 12, 2024
1 parent 3f74274 commit d6067ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/asciidoc/modules/ROOT/pages/export/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ In addition to exporting data in these formats, we can choose to export the whol

For more information on how to use these procedures, see:

* xref::export/web-apis.adoc[]
* xref::export/csv.adoc[]
* xref::export/json.adoc[]
* xref::export/cypher.adoc[]
Expand Down
3 changes: 1 addition & 2 deletions docs/asciidoc/modules/ROOT/pages/export/web-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
= Export data to S3
:description: This section gives an overview on how exporting procedures can be used with S3.

To export to S3, https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/{apoc-release}/apoc-aws-dependencies-{apoc-release}.jar[apoc-aws-dependencies-{apoc-release}.jar]
needs to be downloaded and copied into the plugins directory _<NEO4J_HOME>/plugins_.
To export to S3, the https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/{apoc-release}/apoc-aws-dependencies-{apoc-release}.jar[APOC AWS dependency jar] needs to be downloaded and copied into the plugins directory, _<NEO4J_HOME>/plugins_.

After copying the jars into the plugins directory, the database will need to be restarted.

Expand Down
10 changes: 6 additions & 4 deletions docs/asciidoc/modules/ROOT/pages/import/web-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ As `apoc.import.file.use_neo4j_config` is enabled, the procedures check whether
reading the two configuration parameters `dbms.security.allow_csv_import_from_file_urls` and `dbms.directories.import` respectively.
If you want to remove these constraints please set `apoc.import.file.use_neo4j_config=false`

[cols="5m,5"]
[options="header",cols="5m,5"]
|===
| Procedure | Description
| CALL apoc.load.json('http://example.com/map.json', [path], [config]) YIELD value as person | load JSON from URL
| CALL apoc.load.xml('http://example.com/test.xml', ['xPath'], [config]) YIELD value as doc | load XML from URL
| CALL apoc.load.csv('url',{sep:";"}) YIELD lineNo, list, strings, map, stringMap | load CSV fom URL
| CALL apoc.load.xls('url','Sheet'/'Sheet!A2:B5',\{config}) YIELD lineNo, list, map | load XLS fom URL
|===

Adding `failOnError:false` (by default `true`) to the config map when using any of the procedures in the above table will make them not fail in case of an error and just return zero rows. Example:
Adding `failOnError:false` (by default `true`) to the config map when using any of the procedures in the above table will make them not fail in case of an error.
The procedure will instead return zero rows. For example:

----
CALL apoc.load.json('http://example.com/test.json', null, {failOnError:false})
Expand Down Expand Up @@ -91,11 +93,11 @@ Google Cloud Storage urls have the following shape:

`gs://<bucket_name>/<file_path>`

The authorization type can be specified via an additional `authenticationType` query parameter:
The authorization type can be specified by an additional `authenticationType` query parameter:

* `NONE`: for public buckets (this is the default behavior if the parameter is not specified)
* `GCP_ENVIRONMENT`: for passive authentication as a service account when Neo4j is running in the Google Cloud
* `PRIVATE_KEY`: for using private keys generated for service accounts (requires setting `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to a private key json file as described here: https://cloud.google.com/docs/authentication#strategies)
* `PRIVATE_KEY`: for using private keys generated for service accounts (requires setting `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to a private key JSON file as described by https://cloud.google.com/docs/authentication#strategies[the official Google documentation].)

Example:

Expand Down

0 comments on commit d6067ff

Please sign in to comment.