Code Monkey home page Code Monkey logo

siddhi-store-mongodb's Introduction

Siddhi Store MongoDB

Jenkins Build Status GitHub Release GitHub Release Date GitHub Open Issues GitHub Last Commit License

The siddhi-store-mongodb extension is an extension to Siddhi that persist and retrieve events to/from MongoDB

For information on Siddhi and it's features refer Siddhi Documentation.

Download

  • Versions 2.x and above with group id io.siddhi.extension.* from here.
  • Versions 1.x and lower with group id org.wso2.extension.siddhi.* from here.

Latest API Docs

Latest API Docs is 2.1.4.

Features

  • mongodb (Store)

    Using this extension a MongoDB Event Table can be configured to persist events in a MongoDB of user's choice.

Dependencies

MongoDB connector jar and its dependencies should be added to the runtime (mongodb-java-driver-3.4.2, includes all the dependencies). For installing third party connectors on various Siddhi execution environments refer Siddhi documentation section on adding third party libraries.

Installation

For installing this extension on various Siddhi execution environments refer Siddhi documentation section on adding extensions.

Running Integration tests in docker containers(Optional)

The MongoDB functionality are tested with the docker base integration test framework. The test framework initializes the docker container according to the given profile before executing the test suite.

  1. Install and run docker in daemon mode.

    • Installing docker on Linux,
      Note:
      These commands retrieve content from get.docker.com web in a quiet output-document mode and install.Then we need to stop docker service as it needs to restart docker in daemon mode. After that, we need to export docker daemon host.

       wget -qO- https://get.docker.com/ | sh
       sudo service dockerd stop
       export DOCKER_HOST=tcp://172.17.0.1:4326
       docker daemon -H tcp://172.17.0.1:4326
      
    • On installing docker on Mac, see Get started with Docker for Mac

    • On installing docker on Windows, see Get started with Docker for Windows

  2. To run the integration tests, issue the following commands.

    • MongoDB 3.4 without SSL connection

        mvn verify -P mongod -Ddocker.removeVolumes=true
      
    • MongoDB 3.4 with SSL connection

        mvn verify -P mongod-ssl -Ddocker.removeVolumes=true
      
    • MongoDB 4.2 mvn verify -P mongod4 -Ddocker.removeVolumes=true

Support and Contribution

  • We encourage users to ask questions and get support via StackOverflow, make sure to add the siddhi tag to the issue for better response.

  • If you find any issues related to the extension please report them on the issue tracker.

  • For production support and other contribution related information refer Siddhi Community documentation.

siddhi-store-mongodb's People

Contributors

anoukh avatar anugayan avatar chamathabeysinghe avatar dilini-muthumala avatar dnwick avatar gimantha avatar gokul avatar grainier avatar ksdperera avatar maheshika avatar mayuravaani avatar minudika avatar mohanvive avatar nirmal070125 avatar nisalaniroshana avatar niveathika avatar pcnfernando avatar praboddunuwila avatar ramindu90 avatar sajithshn avatar senthuran16 avatar suhothayan avatar sujanan avatar this avatar tishan89 avatar wso2-jenkins-bot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siddhi-store-mongodb's Issues

DB connection is made at the init method it self

Description:
$subject. As the connection is made as soon as the pool object is created, this should be created at the connect method.

Affected Product Version:
siddhi-store-mongodb-1.x.x

Steps to reproduce:

  1. Stop mongo DB service is it is running
  2. Start SP editor
  3. Import and save mongo DB sample.

Join query with objectID in Mongo document _ID

I've tried to get the whole document related to the update event by using a join query with objectID but it's not success:

from UpdateStream as u left outer join stocks as s on u.id == s.id
select u.id as id, s.name as name, s.volume as volume, s.stockDetails as stockDetails
insert into LogInsertUpdateStream;

The above query result is alway null.
My question is how to to retrieve the whole document using the document id in join query ?
Thank you

How to parse a MongoDB query using Siddhi

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.