Skip to content

Commit

Permalink
Update db2graph readme instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-ibm committed Jun 29, 2020
1 parent 6729642 commit 01845aa
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions db2_graph/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
To load the sample graph data:

1. Extract this archive to a machine that can connect to your Db2 instance
2. The default schema name is demo, if you wish to use a different name then you need to open each of the .sql files in the data/ directory and do a find/replace all for the schema name of your choice.
3. Connect to the Db2 database you want to use for the graph demo, db2 connect to <db_name>
2. Connect to the Db2 database you want to use for the graph demo, db2 connect to <db_name>

If your want to use a schema other than `DEMO` you need to update the schema
in each of the SQL files prior to using them as well as each of the jupyter
notebooks. It is recommended to leave the schema as DEMO if at all possible.
If your want to use a schema other than the default of `DEMO` you need to
update the schema in each of the SQL files in the data/ directory prior to
using them. You will also need to update each jupyter notebook replacing
`DEMO` with the schema you want to use.
It is recommended to leave the schema as DEMO if at all possible.

4. cd into the data directory and run each of the sql files in order:
3. cd into the data directory and run each of the sql files in order:

db2 -tvf 01_createTables.sql
db2 -tvf 02_import.sql
db2 -tvf 03_foreignKeys.sql

5. The demo uses the IBM Db2 python package, for proper setup review the requirements for your system https://github.com/ibmdb/python-ibmdb#-pre-requisites
4. The demo uses the IBM Db2 python package, for proper setup review the requirements for your system https://github.com/ibmdb/python-ibmdb#-pre-requisites

When using miniconda any environment variables you need to set are relative
to the miniconda installation, for example:
export DYLD_LIBRARY_PATH=/Users/<user>/miniconda3/envs/graphdemo/lib/python3.6/site-packages/clidriver/lib

6. The IBM Db2 Graph sample contains a set of Jupyter notebooks to run graph queries and visualize the results. There are specific package versions required for these notebooks and it is recommended you use miniconda (https://docs.conda.io/en/latest/miniconda.html) to create a graph demo environment:
5. The IBM Db2 Graph sample contains a set of Jupyter notebooks to run graph queries and visualize the results. There are specific package versions required for these notebooks and it is recommended you use miniconda (https://docs.conda.io/en/latest/miniconda.html) to create a graph demo environment:

# There is an open defect with conda that may cause problems updating conda
# Refer to https://github.com/conda/conda/issues/9899#issuecomment-638098661 for a workaround:
Expand All @@ -38,7 +39,7 @@ To load the sample graph data:
cd <directory where you extracted the the sample notebooks>
jupyter notebook

7. To setup IBM Db2 Graph please see the technote at https://www.ibm.com/support/pages/node/6205946
6. To setup IBM Db2 Graph please see the technote at https://www.ibm.com/support/pages/node/6205946


## License
Expand Down

0 comments on commit 01845aa

Please sign in to comment.