Skip to content

Commit 13a589b

Browse files
committed
Cleanup Cypher README
1 parent 365cebc commit 13a589b

File tree

1 file changed

+5
-55
lines changed

1 file changed

+5
-55
lines changed

cypher/README.md

Lines changed: 5 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# LDBC SNB Cypher implementation
22

3-
[(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.
45

5-
## Starting Neo4j
6+
## Loading the Data in Neo4j
67

78
The Neo4j instance is run in Docker. To initialize the environment variables, use:
89

910
```bash
1011
. scripts/environment-variables-default.sh
1112
```
1213

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:
1415

1516
```bash
1617
export NEO4J_CSV_DIR=/path/to/the/directory/social_network/
@@ -21,55 +22,4 @@ export NEO4J_CSV_POSTFIX=_0_0.csv
2122
scripts/load-in-one-step.sh
2223
```
2324

24-
## Loading the data set
25-
26-
### Generating the data set
27-
28-
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

Comments
 (0)