Using Jaspersoft with MongoDBMariano LunaSenior Sales Engineer, JaspersoftApril 16, 2013
Session Overview What is MongoDB? Connecting to MongoDB from JasperServer The MongoDB Query Language Using MongoDB in ...
What is MongoDB MongoDB (from "humongous") is an open source       document database written in C++. MongoDB in a nutshe...
The Jaspersoft MongoDB QueryLanguage The Jaspersoft MongoDB Query Language is a JSON-       style declarative language fo...
Connecting Jaspersoft to MongoDB Creating a JasperServer       Datasource Setting connection URL                      mo...
API Driven QueriesQuerying Mongo form Jasper{            # The following parameter is mandatory.            collectionName...
Command Driven QueriesQuerying mongo form Jasper{            runCommand : { Command body },            # The following par...
Example QueriesMinimal{ collectionName : accounts’ }Filtered and parameterized{              collectionName : accounts,   ...
Example QueriesSpecify the fields returned and sort the results{           collectionName : accounts,           findFields...
Example QueriesUsing the Aggregation{        runCommand: {           aggregate : zips,           pipeline : [ { $group : {...
Demo
Additional Resources MongoDB       http://www.mongodb.org/      MongoDB Documentation       http://docs.mongodb.org/manu...
Thank You
Upcoming SlideShare
Loading in...5
×

Using Jaspersoft with MongoDB

3,982

Published on

Slide deck for the April 16, 2013 Jaspersoft Tech Talk.

http://www.jaspersoft.com/external/jaspersoft-tech-talks

* MongoDB - http://www.mongodb.org/
* MongoDB Documentation - http://docs.mongodb.org/manual/
* The Jaspersoft MongoDB Query Language - http://community.jaspersoft.com/wiki/jaspersoft-mongodb-query-language
* Right Outer Join Blog - by Matt Dahlman http://mdahlman.wordpress.com/2011/09/02/simple-reporting-on-mongodb/
* JasperReports Server Documentation - http://community.jaspersoft.com/documentation/

Published in: Technology, Education
1 Comment
2 Likes
Statistics
Notes
  • Thanks - the query slide was VERY helpful!!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
3,982
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
52
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Using Jaspersoft with MongoDB

  1. 1. Using Jaspersoft with MongoDBMariano LunaSenior Sales Engineer, JaspersoftApril 16, 2013
  2. 2. Session Overview What is MongoDB? Connecting to MongoDB from JasperServer The MongoDB Query Language Using MongoDB in iReport Using Adhoc with MongoDB©2010 Jaspersoft Corporation. Proprietary and Confidential 2
  3. 3. What is MongoDB MongoDB (from "humongous") is an open source document database written in C++. MongoDB in a nutshell  Document-Oriented Storage (JSON Documents)  JSON-style documents with dynamic schemas offer simplicity and power.  Full Index Support. Index on any attribute, just like youre used to.  Rich, document-based query language.  Map/Reduce  Flexible aggregation and data processing.©2010 Jaspersoft Corporation. Proprietary and Confidential 3
  4. 4. The Jaspersoft MongoDB QueryLanguage The Jaspersoft MongoDB Query Language is a JSON- style declarative language for specifying what data to retrieve from MongoDB. The connector converts this query into the appropriate API calls and uses the MongoDB Java connector to query the MongoDB instance. There are two types of queries supported:  API driven queries: These queries rely on the mongo-java-driver support provided to query MongoDB.  Command driven queries: This queries allow the usage of MongoDB Aggregation Framework operators©2010 Jaspersoft Corporation. Proprietary and Confidential 4
  5. 5. Connecting Jaspersoft to MongoDB Creating a JasperServer Datasource Setting connection URL mongodb://<SERVER>:<PORT>/<COLLECTION> and (optional) authentication©2010 Jaspersoft Corporation. Proprietary and Confidential 5
  6. 6. API Driven QueriesQuerying Mongo form Jasper{ # The following parameter is mandatory. collectionName : myCollection Details, # The following parameters are optional findQuery : { Details }, findFields : { Details }, sort : {Details}, mapReduce : {Details}, limit : int Details, rowsToProcess : int Details}©2010 Jaspersoft Corporation. Proprietary and Confidential 6
  7. 7. Command Driven QueriesQuerying mongo form Jasper{ runCommand : { Command body }, # The following parameter is optional rowsToProcess : int Details}Using runCommand to access the MongoDB aggregation framework{ runCommand : { aggregate : COLLECTION_NAME, pipeline : [ List of aggregation operations ] }}©2010 Jaspersoft Corporation. Proprietary and Confidential 7
  8. 8. Example QueriesMinimal{ collectionName : accounts’ }Filtered and parameterized{ collectionName : accounts, findQuery : { status_date : { $gte : $P{StartDate} }, name : { $regex : ^N, $options : } }}©2010 Jaspersoft Corporation. Proprietary and Confidential 8
  9. 9. Example QueriesSpecify the fields returned and sort the results{ collectionName : accounts, findFields : { name:1, phone_office:1, billing_address_city:1, billing_address_street:1, billing_address_country:1 }, sort : { billing_address_country:-1, billing_address_city:1 }}©2010 Jaspersoft Corporation. Proprietary and Confidential 9
  10. 10. Example QueriesUsing the Aggregation{ runCommand: { aggregate : zips, pipeline : [ { $group : { _id : $state, population: { $sum : $pop } } }, { $sort : { population : -1 } } ]}©2010 Jaspersoft Corporation. Proprietary and Confidential 10
  11. 11. Demo
  12. 12. Additional Resources MongoDB http://www.mongodb.org/ MongoDB Documentation http://docs.mongodb.org/manual/ The Jaspersoft MongoDB Query Languagehttp://community.jaspersoft.com/wiki/jaspersoft- mongodb-query-language Right Outer Join Blog - by Matt Dahlman http://mdahlman.wordpress.com/2011/09/02/simple-reporting-on- mongodb/ JasperReports Server Documentation http://community.jaspersoft.com/documentation/©2010 Jaspersoft Corporation. Proprietary and Confidential 12
  13. 13. Thank You
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×