aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorArun Isaac2022-05-05 15:12:54 +0530
committerArun Isaac2022-05-05 15:15:11 +0530
commit34ad9946788ba7ac4707c7e945578386c9959144 (patch)
tree2deec4abfc602ea5e7f2389715c186b8db8b075a /README.md
parent1fcf31ec48d4c9f8c1ed45896cfb592ebae8f7fb (diff)
downloadgn-transform-databases-34ad9946788ba7ac4707c7e945578386c9959144.tar.gz
README: Document loading RDF and visualizing schema.
* README.md (Using): Document loading RDF and visualizing schema.
Diffstat (limited to 'README.md')
-rw-r--r--README.md40
1 files changed, 38 insertions, 2 deletions
diff --git a/README.md b/README.md
index 069fdb8..d558e4d 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,13 @@ with the appropriate values.
(sql-password . "<sql-password-here>")
(sql-database . "<sql-database-name-here>")
(sql-host . "<sql-hostname-here>")
- (sql-port . <sql-port-here>))
+ (sql-port . <sql-port-here>)
+ (virtuoso-port . <virtuoso-port-here>)
+ (virtuoso-username . "<virtuoso-username-here>")
+ (virtuoso-password . "<virtuoso-password-here>")
+ (sparql-scheme . <sparql-endpoint-scheme-here>)
+ (sparql-host . "<sparql-endpoint-hostname-here>")
+ (sparql-port . <sparql-endpoint-port-here>))
```
Then, to dump the database to \~/data/dump, run
@@ -34,7 +40,37 @@ $ ./pre-inst-env ./dump.scm conn.scm ~/data/dump
```
Make sure there is enough free space! It\'s best to dump the database on
-penguin2 where disk space and bandwidth are not significant constraints.
+penguin2 where disk space and bandwidth are not significant
+constraints.
+
+Then, load the dumped RDF into virtuoso. This will load the dumped RDF
+into the `http://genenetwork.org` graph, and will delete all
+pre-existing data in that graph.
+
+``` shell
+$ ./pre-inst-env ./load-rdf.scm conn.scm ~/data/dump/dump.ttl
+```
+
+Now, you may query virtuoso to visualize the SQL and RDF schema.
+
+``` shell
+$ ./pre-inst-env ./visualize-schema.scm conn.scm
+```
+
+This will output graphviz dot files `sql.dot` and `rdf.dot` describing
+the schema. Render them into SVG images like so.
+
+``` shell
+$ dot -Tsvg -osql.svg sql.dot
+$ dot -Tsvg -ordf.svg rdf.dot
+```
+
+Or, peruse them interactively with `xdot`.
+
+``` shell
+$ xdot sql.dot
+$ xdot rdf.dot
+```
# Contributing