Posts

Showing posts with the label mongodb

Dealing with Nested Documents in MongoDB and Talend (aka Baking a Cake)

Image
Abstract: MongoDB is a very popular document database that gives you a huge amount of flexibility when it comes to storing data. On the other hand, the traditional relational model is far less flexible in how data is stored - you're limited to columns and rows. Sometimes you want to go from a flexible model like MongoDB to a relational one, that's what this post attempts to explain using  Talend / JaspersoftETL  (ETL tools). I do not want to get into the relational vs non-relational model argument in this post - it's only an example if you need to do this for some reason...I'm pro choice :) Scenario: We have a JSON document in MongoDB that looks like this: { "id" : "0001", "type" : "donut", "name" : "Cake", "ppu" : 0.55, "batters" : { "batter" : [ ...

Geospatial Features in MongoDB with Jaspersoft

Image
Lately I have been posting technical examples to the Jaspersoft community wiki instead of this blog. I'll cross-post this one because there are not many examples of doing this. When working with Geospatial data, I found the $near operator to be pretty sweet. Let me show you by example. In the screenshots below you'll see that I constructed a report that shows "cases" on a map. When you click on a specific case you will be taken to a detail level report. The detail level report will show you cases nearby for that service. So for example, if someone reports a broken street light on Market Street, this might help you locate similar cases. So how is it done?  Quite simple really, take a look at this mongodb  query : Line 8: The $P{location} parameter is a java.util.List that contains longitude and latitude coordinates, something like [-122.4194200,37.7749300] Line 11: How many meters from the center (specified in line 8) should it search Line 13: T...

New MongoDB Components in Talend/JaspersoftETL

Image
I uploaded two videos with examples of using the tMongoDBInput and tMongoDBRow components that are shipping with JaspersoftETL 5.2.2 (Plus edition) and Talend 5.2.2+ I recommend you change the quality to 720p to watch the videos in better quality. I hope you find them useful! Part 1: Using tMongoDBInput (and using Talend's built in aggregation engine): Part 2: Using tMongoDBRow (and the aggregation framework):