From 78bed7d730cb8347d7815d3975d4522e4f05d4ca Mon Sep 17 00:00:00 2001 From: Michel Conrado Date: Fri, 3 Apr 2020 12:35:37 -0300 Subject: [PATCH 1/2] Add xidmap and store_xids to documentation Reference: https://github.com/dgraph-io/dgraph/pull/5090 --- wiki/content/deploy/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wiki/content/deploy/index.md b/wiki/content/deploy/index.md index 7bb36c2255b..fbc299ac018 100644 --- a/wiki/content/deploy/index.md +++ b/wiki/content/deploy/index.md @@ -1784,6 +1784,8 @@ Alpha server. `-a, --alpha` (default: `localhost:9080`): Dgraph Alpha gRPC server address to connect for live loading. This can be a comma-separated list of Alphas addresses in the same cluster to distribute the load, e.g., `"alpha:grpc_port,alpha2:grpc_port,alpha3:grpc_port"`. +`--xidmap` (default: disabled. Need a path): Store xid to uid mapping to a directory. Dgraph will save all identifiers used in the load for later use in other data ingest operations. The mapping will be saved in the path you provide and you must indicate that same path in the next load. It is recommended to use this flag if you have full control over your identifiers (Blank-nodes). Because the identifier will be mapped to a specific UID. + ### Bulk Loader {{% notice "note" %}} @@ -1933,6 +1935,10 @@ ending in .rdf, .rdf.gz, .json, and .json.gz will be loaded. `--format`: Specify file format (rdf or json) instead of getting it from filenames. This is useful if you need to define a strict format manually. +`-x, --store_xids`: Generate a xid edge for each node. It will store the XIDs (The identifier / Blank-nodes) in an attribute named `xid` in the entity itself. It is useful if you gonna use [External IDs](/mutations#external-ids). + +`--xidmap` (default: disabled. Need a path): Store xid to uid mapping to a directory. Dgraph will save all identifiers used in the load for later use in other data ingest operations. The mapping will be saved in the path you provide and you must indicate that same path in the next load. It is recommended to use this flag if you have full control over your identifiers (Blank-nodes). Because the identifier will be mapped to a specific UID. + #### Tuning & monitoring ##### Performance Tuning From 7fefbfeb11d90b62f4544aa7ea5adbda93864c7e Mon Sep 17 00:00:00 2001 From: Michel Conrado Date: Thu, 9 Apr 2020 14:08:55 -0300 Subject: [PATCH 2/2] Remove -x flag in bulk Also have added -x to Live and make xidmap default in comments. --- wiki/content/deploy/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wiki/content/deploy/index.md b/wiki/content/deploy/index.md index fbc299ac018..03adb8dd808 100644 --- a/wiki/content/deploy/index.md +++ b/wiki/content/deploy/index.md @@ -1739,7 +1739,7 @@ Dgraph Live Loader (run with `dgraph live`) is a small helper program which read Dgraph Live Loader correctly handles assigning unique IDs to blank nodes across multiple files, and can optionally persist them to disk to save memory, in case the loader was re-run. -{{% notice "note" %}} Dgraph Live Loader can optionally write the xid->uid mapping to a directory specified using the `-x` flag, which can reused +{{% notice "note" %}} Dgraph Live Loader can optionally write the xid->uid mapping to a directory specified using the `--xidmap` flag, which can reused given that live loader completed successfully in the previous run.{{% /notice %}} ```sh @@ -1784,7 +1784,7 @@ Alpha server. `-a, --alpha` (default: `localhost:9080`): Dgraph Alpha gRPC server address to connect for live loading. This can be a comma-separated list of Alphas addresses in the same cluster to distribute the load, e.g., `"alpha:grpc_port,alpha2:grpc_port,alpha3:grpc_port"`. -`--xidmap` (default: disabled. Need a path): Store xid to uid mapping to a directory. Dgraph will save all identifiers used in the load for later use in other data ingest operations. The mapping will be saved in the path you provide and you must indicate that same path in the next load. It is recommended to use this flag if you have full control over your identifiers (Blank-nodes). Because the identifier will be mapped to a specific UID. +`-x, --xidmap` (default: disabled. Need a path): Store xid to uid mapping to a directory. Dgraph will save all identifiers used in the load for later use in other data ingest operations. The mapping will be saved in the path you provide and you must indicate that same path in the next load. It is recommended to use this flag if you have full control over your identifiers (Blank-nodes). Because the identifier will be mapped to a specific UID. ### Bulk Loader @@ -1935,7 +1935,7 @@ ending in .rdf, .rdf.gz, .json, and .json.gz will be loaded. `--format`: Specify file format (rdf or json) instead of getting it from filenames. This is useful if you need to define a strict format manually. -`-x, --store_xids`: Generate a xid edge for each node. It will store the XIDs (The identifier / Blank-nodes) in an attribute named `xid` in the entity itself. It is useful if you gonna use [External IDs](/mutations#external-ids). +`--store_xids`: Generate a xid edge for each node. It will store the XIDs (The identifier / Blank-nodes) in an attribute named `xid` in the entity itself. It is useful if you gonna use [External IDs](/mutations#external-ids). `--xidmap` (default: disabled. Need a path): Store xid to uid mapping to a directory. Dgraph will save all identifiers used in the load for later use in other data ingest operations. The mapping will be saved in the path you provide and you must indicate that same path in the next load. It is recommended to use this flag if you have full control over your identifiers (Blank-nodes). Because the identifier will be mapped to a specific UID.