1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/memgraph/example/load-csv.sh
2024-02-23 17:16:21 +08:00

16 lines
330 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")"
FILE=$(date -d yesterday +%F).csv.gz
SRC_FILE=/data/dns/data/$FILE
DST_FILE=/path/to/dns.csv.gz
echo "$(date +%FT%T) GET $FILE"
scp elk-us:$SRC_FILE $DST_FILE
echo "$(date +%FT%T) LOAD CSV"
docker exec -i memgraph_memgraph_1 mgconsole < load-csv.cql
echo "$(date +%FT%T) DONE"