ArangoDB 通过两个Document的Collection生成关系
for m in meridians
for p in acupoints
filter p.Meridian == m.DisplayName
insert {_from: p._id, _to:m._id, property:”12”} in Relations将SQL数据库中导出的CSV文件导入到ArangoDB,每个表一个文件
#!/bin/sh
# import CSV files data into arangoDB
# which name are like: `filename`.csv
# Noock Tian
# 2018-01-08
export CSV_FILES=`ls *.csv`
for f in $CSV_FILES
do
export IFS='\`.'
arr=($f)
#echo @0=${arr[0]} @1=${arr[1]} @2=${arr[2]} @3=${arr[3]}
export Table=${arr[1]}
echo "importing $f ==> $Table ..."
arangoimp --file "$f" --type csv --collection $Table --create-collection true --server.database TCM --server.username Noock --server.password tdz
done