ArangoDB 圖資料庫筆記
阿新 • • 發佈:2018-12-14
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
---------------------
作者:noock
來源:CSDN
原文:https://blog.csdn.net/Nocky/article/details/78925228
版權宣告:本文為博主原創文章,轉載請附上博文連結!