Skip to content

How to parse a MongoDB query using Siddhi #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
BuddhiWathsala opened this issue Sep 2, 2019 · 1 comment
Open

How to parse a MongoDB query using Siddhi #46

BuddhiWathsala opened this issue Sep 2, 2019 · 1 comment

Comments

@BuddhiWathsala
Copy link

Description:
As far as I understand using the test cases provided here we can do all CRUD operations to the MongoDB using this Siddhi MongoDB extension. My question is how do I parse a complex query(like below) into a MongoDB table and get the output to Siddhi level for further process.

db.employees.aggregate( [
   {
      $graphLookup: {
         from: "employees",
         startWith: "$reportsTo",
         connectFromField: "reportsTo",
         connectToField: "name",
         as: "reportingHierarchy"
      }
   }
] )

Refer
https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/#examples

@niveathika
Copy link
Member

Not all operations are supported, Out of siddhi operations only AND, OR, Compare operators and null check is supported.
https://github.com/siddhi-io/siddhi-store-mongodb/blob/master/component/src/main/java/io/siddhi/extension/store/mongodb/MongoExpressionVisitor.java#L318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants