Using BIRT with MongoDB with query result greater 16Mb
<p>I use BIRT Designer Version 4.5.0.v201506092134 Build and MongoDB 3.2.<br>
I use aggregation with the model parameters for generating reports.<br>
If the query result exceeds 16Mb(standard limit for the maximum document size in MongoDB ), then generated a blank report.<br>
If I use the aggregation with the given values, in this case, the following error occurs.</p>
<blockquote class="ipsBlockquote">
<p> </p>
<p>org.eclipse.datatools.connectivity.oda.OdaException: Unable to run the Aggregate command operation.<br>
Check that your connected MongoDB server is version 2.2 or later. ;<br>
com.mongodb.CommandFailureException: { "serverUsed" : "****.****.xx.67:27017" , "errmsg" : "exception: aggregation result exceeds maximum document size (16MB)" , "code" : 16389 , "ok" : 0.0 , "$gleStats" : { "lastOpTime" : { "$ts" : 1478325157 , "$inc" : 2} , "electionId" : { "$oid" : "581d6354784d3469c49a0b83"}}}<br><br>
at org.eclipse.birt.data.oda.mongodb.internal.impl.MDbOperation.callAggregateCmd(MDbOperation.java:361)<br><br>
at org.eclipse.birt.data.oda.mongodb.internal.impl.MDbMetaData.getAvailableFields(MDbMetaData.java:191)<br><br>
at org.eclipse.birt.data.oda.mongodb.ui.util.FieldEntryWrapper.getAvailableFields(FieldEntryWrapper.java:88)<br><br>
at org.eclipse.birt.data.oda.mongodb.ui.util.FieldEntryWrapper.updateAvailableFields(FieldEntryWrapper.java:100)<br><br>
at org.eclipse.birt.data.oda.mongodb.ui.impl.MongoDBDataSetWizardPage$25.run(MongoDBDataSetWizardPage.java:1438)<br><br>
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)<br><br>
at org.eclipse.birt.data.oda.mongodb.ui.impl.MongoDBDataSetWizardPage.updateAvailableFieldsList(MongoDBDataSetWizardPage.java:1418)<br><br>
at org.eclipse.birt.data.oda.mongodb.ui.impl.MongoDBDataSetWizardPage.doUpdateAvailableFieldsArea(MongoDBDataSetWizardPage.java:2046)<br><br>
at org.eclipse.birt.data.oda.mongodb.ui.impl.MongoDBDataSetWizardPage.access$39(MongoDBDataSetWizardPage.java:2042)<br><br>
at org.eclipse.birt.data.oda.mongodb.ui.impl.MongoDBDataSetWizardPage$24.widgetSelected(MongoDBDataSetWizardPage.java:1182)<br><br>
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)<br><br>
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)<br><br>
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)<br><br>
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)<br><br>
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)</p>
</blockquote>
<p>
Example of query(replacing fields - "claimCreate"):</p>
<pre class="_prettyXprint _lang-js">
{
$match: {
"creatorDeptId": {$exists: true},
"claimCreate" : {$exists: true},
"customClaimNumber" : {$exists: true},
"currStatus.statusCode" : {$exists: true},
"daysToDeadline" : {$exists: true},
"service.name" : {$exists: true},
"service.srguServicePassportId" : {$exists: true},
"service.srguDepartmentName" : {$exists: true},
"oktmo": { $regex: "^46" } ,
"senderCode": { $ne: "116901501" },
"person.applicantType": {$in: ["PHYSICAL", "JURIDICAL" , "IP"]},
"providerName" : {$exists: true},
"creatorDeptId": "mfc-odincovo",
"claimCreate" : { $lte: { $date: "2016-06-05T00:00:00Z" }, $gte: { $date: "2016-06-01T00:00:00Z" } }
}
},
{
$project: {
"claimCreate" : "$claimCreate",
"creatorDeptId" : "$creatorDeptId",
"urmName": { $ifNull: [ "$urmName" , "" ] },
"customClaimNumber" : "$customClaimNumber",
"providerName" : "$providerName",
"service_srguDepartmentName" : "$service.srguDepartmentName",
"service_srguServicePassportId" : "$service.srguServicePassportId",
"service_name" : "$service.name",
"currStatus_statusCode" : "$currStatus.statusCode",
"person_fio": { $ifNull: [ "$person.fio" , "" ] },
"person_orgName": { $ifNull: [ "$person.orgName" , "" ] }
}
}
</pre>
<p>Is there a way to get around in BIRT it is unfortunate limitation of MongoDB(for instance, using cursors, MapReduce, RunDatabaseCommand, $queryExpression or Property Binding)?<br>
Help me, please.<br><br>
</p>
<p> </p>
<p>PS. Sorry for my English )))</p>