0

のaws-s3からCSVデータを読み込みます。aws-s3(csv形式)のデータがあり、グラフローダーを使用してそのデータをdseグラフにロードします。私は検索がありますが、このトピックでは何も見つかりませんでした。 dse graph Loaderを使用することは可能ですか?ここでdsのグラフのローダー

答えて

0

は、CSVのからの読み取り時にマッピングがグラフローダーを探します方法は次のとおりです。ここで

https://docs.datastax.com/en/latest-dse/datastax_enterprise/graph/dgl/dglCSV.html

は、HDFSの例は、(また、CSVファイルで)だ、S3は類似していなければならない(ただdfs_urlを入れ替える:

// Configures the data loader to create the schema 
config create_schema: true, load_new: true, preparation: true 
// Define the data input sources 
// dfs_uri specifies the URI to the HDFS directory in which the files are stored. 
dfs_uri = 'hdfs://host:port/path/' 
authorInput = File.csv(dfs_uri + 'author.csv.gz').gzip().delimiter('|') 
//Specifies what data source to load using which mapper (as defined inline) 
load(authorInput).asVertices 
{ label "author" key "name" } 
// graphloader call 
./graphloader myMap.groovy -graph testHDFS -address localhost 
// start gremlin console and check the data 
bin/dse gremlin-console 
:remote config reset g testHDFS.g 
schema.config().option('graph.schema_mode').set('Development') 
g.V().hasLabel('author') 
+0

はい、datastaxコミュニティがs3に関するこのドキュメントを追加しました。https://docs.datastax.com/en/latest-dse/datastax_enterprise/graph/dgl/dglS3.html –