Skip to content

Commit 79f87e8

Browse files
authored
Merge pull request #75 from jackwaudby/master
fixed sed issue, updated README.md
2 parents ea90062 + f064f07 commit 79f87e8

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ validation_params.csv
1111
*-actual.json
1212
*-expected.json
1313
results-*/
14+
*.DS_Store

cypher/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ The following script takes care of those steps:
4040
./convert-csvs.sh
4141
```
4242

43+
Note, if you are using OSX please install `gnu-sed`.
44+
```bash
45+
brew install gnu-sed
46+
# GNU "sed" is installed as "gsed"
47+
# to use as "sed" add a "gnubin" directory to PATH from your start-up file
48+
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
49+
```
50+
4351
#### Delete your database and load the SNB CSVs
4452

4553
Be careful -- this deletes all data in your database, imports the SNB data set and restarts the database.

cypher/load-scripts/convert-csvs.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
echo "starting preprocessing"
4+
35
# replace headers
46
while read line; do
57
IFS=' ' read -r -a array <<< $line
@@ -21,3 +23,5 @@ sed -i "s#|\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\)|#|\1\2\3|#g" "
2123
# convert each datetime of format yyyy-mm-ddThh:mm:ss.mmm+0000
2224
# to a number of format yyyymmddhhmmssmmm
2325
sed -i "s#|\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\)T\([0-9][0-9]\):\([0-9][0-9]\):\([0-9][0-9]\)\.\([0-9][0-9][0-9]\)+0000#|\1\2\3\4\5\6\7#g" ${NEO4J_DATA_DIR}/*${POSTFIX}
26+
27+
echo "preprocessing finished"

0 commit comments

Comments
 (0)