您的位置:首页 > 数据库

ArangoDB 图数据库笔记

2017-12-28 18:42 92 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息