-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dgraph/cmd/migrate README.md. (#5495)
This commit is meant to update the instructions for using `dgraph/cmd/migrate` to work with Dgraph 20.03.x.
- Loading branch information
1 parent
6015cd3
commit 3b96d18
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
install the Dgraph binary from source | ||
Install the latest Dgraph binary from source | ||
``` | ||
go get -v github.com/dgraph-io/dgraph/dgraph | ||
curl https://get.dgraph.io -sSf | bash | ||
``` | ||
|
||
create a config.properties file that has the following options | ||
|
||
Create a config.properties file that has the following options (values should not be in quotes): | ||
``` | ||
user = <the user for logging in to the SQL database> | ||
password = <the password for logging in to the SQL database> | ||
db = <the SQL database to be migrated> | ||
``` | ||
|
||
export the SQL database into a schema and RDF file, e.g. the schema.txt and sql.rdf file below | ||
|
||
Export the SQL database into a schema and RDF file, e.g. the schema.txt and sql.rdf file below | ||
``` | ||
dgraph migrate --config config.properties --output_schema schema.txt --output_data sql.rdf | ||
``` | ||
|
||
import the data into Dgraph with the live loader (the example below is connecting to the Dgraph zero and alpha servers running on the default ports) | ||
If you are connecting to a remote DB (something hosted on AWS, GCP, etc...), you need to pass the following flags | ||
``` | ||
-- host <the host of your remote DB> | ||
-- port <if anything other than 3306> | ||
Import the data into Dgraph with the live loader (the example below is connecting to the Dgraph zero and alpha servers running on the default ports) | ||
``` | ||
dgraph live -z localhost:5080 -a localhost:9080 --files sql.rdf --format=rdf --schema schema.txt | ||
``` |