1

OLAP クエリを実行したいと考えています。OLTPクエリにdatastax node.jsドライバーを使用しています。node.js を使用して OLAP を実行するにはどうすればよいですか?

http://www.datastax.com/dev/blog/nodejs-driver-for-datastax-enterprise

4

1 に答える 1

2

これを実行するにはいくつかの方法がありますが、最も直接的な方法は、 のパラメータにgraphSource'a' を指定することです。ソース「a」は、OLAPトラバーサル・ソース( source )を使用するためにDSE Graphと通信します。queryOptionsexecuteGraph

client.executeGraph('g.V().count()', null, {graphSource: 'a'}, function (err, result) {
  // process result
});

ExecutionProfileまたは、 OLAP クエリを実行するために再利用できる at client の初期化を定義することもできます。

const client = new Client({
  contactPoints: ['127.0.0.1']
  profiles: [
    new ExecutionProfile('olap', {graphOptions: {source: 'a'}})
  ]
});

client.executeGraph('g.V().count()', null, { executionProfile: 'olap' }, function (err, result) {
});
于 2016-11-18T14:50:10.543 に答える