Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: MongoDB datasource - parameterizable connection details

  1. #1
    Join Date
    Sep 2017

    Default MongoDB datasource - parameterizable connection details


    I just started to use Pentaho Reporting and I wanted to use MongoDB datasource.

    But I cannot find any way, how to parametrize connection details (database name, ...). The string replacement syntax ${} is not working here.
    I need to parametrize database credentials and than run report creation from PDI via Pentaho Reporting step - and pass here some parameters.

    I found a solution by using PDI transformation as data source for report (and pass variables in a way PDI (reporting step) -> reporter -> PDI (transformation defined as data source) ), but this not clean and it is not working well.

    Can somebody help? Really is not possible to parametrize MongoDB data source connection?

  2. #2
    Join Date
    Aug 2016


    You cannot replace structural elements of a query using the normal parameter syntax as it leaves it open to SQL injection

    You can however use query scripting to do this

    See my reply in this thread:

    You can use the same idea to do what you want

  3. #3
    Join Date
    Sep 2017


    Thank you for your answer, it was helpful.

    I solved it by usage the Scriptable data source, where I use mongo driver for reading from database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.