You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[`direnv`](https://direnv.net/) installed, including shell hooks;
26
-
-[`.envrc`](https://github.com/avisionh/sqlquerygraph/blob/main/.envrc) allowed/trusted by `direnv` to use the environment variables - see [below](#set-up);
27
26
28
27
<!--Note there may be some Python IDE-specific requirements around loading environment variables, which are not considered here. -->
29
28
@@ -41,9 +40,9 @@ poetry install
41
40
pre-commit install
42
41
```
43
42
44
-
To then extract the tables and their dependencies from the example SQL scripts in the `sql/` directory, run the following in your shell/terminal:
43
+
To then extract the tables and their dependencies from the example SQL scripts in the `sql/` directory, run the below in your shell/terminal. It will generate `.csv` files of the tables and their dependencies. It will also generate `.cypher` files to enable you to import the data into neo4j, after you have added the `.csv` files to the database.
python sqlquerygraph.py -sd 'sql' -ed 'neo4j' -rd '<datasets, individually quoted and separated by commas, of tables in sql/ scripts>'
47
46
```
48
47
49
48
### Run neo4j graph database
@@ -59,19 +58,16 @@ We use [neo4j](https://neo4j.com/) for this project to visualise the dependencie
59
58
export NEO4J_USERNAME=neo4j
60
59
export NEO4J_PASSWORD=<your_password>
61
60
```
62
-
63
-
1. Update your `.env` file to take in the new `.secrets` file you created by entering the below in your shell/terminal:
61
+
Then update your `.env` file to take in the new `.secrets` file you created by entering the below in your shell/terminal:
64
62
```shell script
65
63
direnv allow
66
64
```
67
65
68
66
1. Build the Docker image and launch the container. Within this directory that has the `docker-compose.yml` file, run the below in your shell/terminal:
69
67
```shell script
70
-
docker-compose build
71
68
docker-compose up
72
69
```
73
-
74
-
1. If it's the first time you have downloaded the neo4j docker image, wait awhile (maybe 15 minutes, depends on your machine specs). If you have downloaded the neo4j docker image before (such as going through these instructions), then wait a few minutes. You will know when it's ready when you get the following message in your terminal:
70
+
You will know when it's ready when you get the following message in your terminal:
75
71
```
76
72
app | [INFO wait] Host [neo4j:7687] is now available!
0 commit comments