I would like to run OLAP queries . Im using datastax node.js driver for OLTP queires. How can I run OLAP using node.js ?
http://www.datastax.com/dev/blog/nodejs-driver-for-datastax-enterprise
I would like to run OLAP queries . Im using datastax node.js driver for OLTP queires. How can I run OLAP using node.js ?
http://www.datastax.com/dev/blog/nodejs-driver-for-datastax-enterprise
There are a few ways to go about doing it, but the most direct route is to provide a graphSource of 'a' in the queryOptions parameter of executeGraph. The source 'a' communicates to DSE Graph to use the OLAP traversal source (source).
client.executeGraph('g.V().count()', null, {graphSource: 'a'}, function (err, result) {
// process result
});
Alternatively, you could define an ExecutionProfile at client initialization that can be reused to execute OLAP queries:
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) {
});