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
[(open)Cypher](http://www.opencypher.org/) implementation of the [LDBC SNB BI benchmark](https://github.com/ldbc/ldbc_snb_docs).
3
+
[Cypher](http://www.opencypher.org/) implementation of the [LDBC SNB benchmark](https://github.com/ldbc/ldbc_snb_docs).
4
+
Note that some BI queries are not expressed using pure Cypher, instead, they make use of the [APOC](https://neo4j.com/labs/) and [Graph Data Science](https://neo4j.com/product/graph-data-science-library/) Neo4j libraries.
4
5
5
-
## Starting Neo4j
6
+
## Loading the Data in Neo4j
6
7
7
8
The Neo4j instance is run in Docker. To initialize the environment variables, use:
8
9
9
10
```bash
10
11
. scripts/environment-variables-default.sh
11
12
```
12
13
13
-
To load the data, you might want to adjust the following variables:
14
+
To load a data set other than the example data set, you might want to adjust the following variables:
The data set needs to be generated and preprocessed before loading it to the database. To generate it, use the `CsvComposite` serializer classes of the [DATAGEN](https://github.com/ldbc/ldbc_snb_datagen/) project:
29
-
30
-
```
31
-
generator.scaleFactor:0.003
32
-
generator.mode:interactive
33
-
serializer.format:CsvComposite
34
-
```
35
-
36
-
An example configuration for scale factor 1 is given in the [`params-csv-composite.ini`](https://github.com/ldbc/ldbc_snb_datagen/blob/dev/params-csv-composite.ini) file of the Datagen repository.
37
-
38
-
### Preprocessing and loading
39
-
#### Preprocessing
40
-
41
-
Set the Neo4j following environment variables appropriately. Once you got the configuration right, you might want to save these variables for later:
42
-
43
-
```bash
44
-
env | grep ^NEO4J_
45
-
```
46
-
47
-
The CSV files require a bit of preprocessing:
48
-
49
-
* replace headers with Neo4j-compatible ones
50
-
* replace labels (e.g. change `city` to `City`)
51
-
* convert date and datetime formats
52
-
53
-
The following script takes care of those steps:
54
-
55
-
```bash
56
-
scripts/convert-csvs.sh
57
-
```
58
-
59
-
#### Delete your database and load the SNB CSVs
60
-
61
-
Be careful -- this deletes all data in your database, imports the SNB data set and restarts the database.
62
-
63
-
```bash
64
-
scripts/delete-neo4j-database.sh
65
-
scripts/import-to-neo4j.sh
66
-
scripts/restart-neo4j.sh
67
-
```
68
-
69
-
#### All-in-one loading script
70
-
71
-
If you know what you're doing, you can run all scripts with a single command:
72
-
73
-
```bash
74
-
scripts/load-in-one-step.sh
75
-
```
25
+
This script replaces the headers in the input CSVs, load them, starts Neo4j, and creates indices.
0 commit comments