我想运行OLAP查询。即时通讯使用datastax node.js驱动程序的联机事务处理查询。如何使用node.js运行联机分析处理?
http://www.datastax.com/dev/blog/nodejs-driver-for-datastax-enterprise
发布于 2016-11-18 22:50:11
有几种方法可以做到这一点,但最直接的方法是在executeGraph的queryOptions参数中提供一个'a‘的graphSource。源'a‘与DSE Graph通信以使用OLAP遍历源(source)。
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) {
});https://stackoverflow.com/questions/40676610
复制相似问题