【问题标题】:MapReduce and iReport / Jasperserver (MongoDB)?MapReduce 和 iReport / Jasperserver (MongoDB)?
【发布时间】:2012-05-14 10:33:59
【问题描述】:

iReport 支持 MapReduce 吗? (使用 MongoDB) 我想知道我是否可以在此窗口中放置 Map Reduce 查询,或者如果不在 jasperserver 上的报告中(当您上传 .jrxml 时,您有一个“查询”选项卡)

谢谢

【问题讨论】:

    标签: mongodb jasper-reports mapreduce ireport jasperserver


    【解决方案1】:

    是的,确实如此。例如:

    {
      collectionName : 'dataByZipCode',
      sort : {
        'value.population' : -1,
      },
      mapReduce : {
        map : 'function () {
                   emit (this.state, {population : this.pop});
                 }',
        reduce : 'function (key, values) {
                      var total = 0;
                      for( var index = 0; index < values.length; index ++) {
                        total += values[index].population;
                      }
                      return {population : total}
                   }',
        out : 'totalPopulation'
      }
    }
    

    Jaspersoft MongoDB Connector Query Reference

    【讨论】:

      【解决方案2】:

      查看 Jasperforge 论坛,根据此更新,它似乎支持 Windows 中的 MapReduce 查询 -

      http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=96980

      我自己没有对此进行测试,但看起来 iReport 允许你运行任何你想要的 Mongo 查询。

      【讨论】:

      • 谢谢!我只是想要一个例子:)
      猜你喜欢
      • 1970-01-01
      • 2015-09-27
      • 1970-01-01
      • 1970-01-01
      • 2016-02-29
      • 1970-01-01
      • 2021-04-07
      相关资源
      最近更新 更多