我想运行 OLAP 查询。我为 OLTP 查询使用 datastax node.js 驱动程序。如何使用 node.js 运行 OLAP?
http://www.datastax.com/dev/blog/nodejs-driver-for-datastax-enterprise
我想运行 OLAP 查询。我为 OLTP 查询使用 datastax node.js 驱动程序。如何使用 node.js 运行 OLAP?
http://www.datastax.com/dev/blog/nodejs-driver-for-datastax-enterprise
有几种方法可以做到这一点,但最直接的方法是在参数 of中提供一个graphSource
of 'a' 。源“a”与 DSE Graph 通信以使用 OLAP 遍历源 ( source )。queryOptions
executeGraph
client.executeGraph('g.V().count()', null, {graphSource: 'a'}, function (err, result) {
// process result
});
或者,您可以定义一个ExecutionProfile
可重用于执行 OLAP 查询的客户端初始化:
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) {
});