Announcement

Collapse
No announcement yet.

Access to database properties

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access to database properties

    Hello.

    Can I access to database properties set in database read/write channel GUI from transformer/filter ?

    Thanks.

  • #2
    Re:Access to database properties

    Nope. You can however use an on-deploy script to set our properties to the globalmap and then set your database read/write settings to variables from the globalMap.

    In your global deploy script:
    Code:
    $g('username', 'sampleuser'); //the $g function lets you place items into the global map
    $g('password', 'passworduser'); //or retrieve them
    Then in your database reader/writer just use ${username} and ${password} in the fields.

    You can later reference the values from your transformer/filter:
    Code:
    logger.info("Username is: " + $g('username')); //when $g is used with one argument, it does a map.get
    Chris Lang

    Comment


    • #3
      Re:Access to database properties

      Just to note - all of that code is 1.6 only.
      Chris Lang

      Comment


      • #4
        Re:Access to database properties

        Thank you

        Comment

        Working...
        X