0

I would like to parametrize which (predefined and parametrized) log DB connection to use, e.g. data.import.log.db=LOG_DB: enter image description here

but I can't get it to work with a job parameter data.import.log.db, or setting variable data.import.log.db in the calling parent job.

The only way I see is setting the variable in kettle.properties, or as a variable from command line. But if the job executes in Carte, I would like the caller to decide on which log connection is to be used -- sometimes a caller decides to not log at all (empty variable). Am I missing something on how to hand over this variable to the job log connection?

Thanks in advance for constructive hints and explanations.

-- edit: using PDI CE 8.0.0-28.

leo
  • 3,528
  • 3
  • 20
  • 19
  • There is no suitable answer on this similar post, so I dare to ask again, also to understand why I was failing. https://stackoverflow.com/questions/36052615 – leo May 15 '18 at 23:34

2 Answers2

1

You cannot parametrise the connection name.

You can parametrise its properties (host, port, username, and password for example), but not the connection name itself.

nsousa
  • 4,448
  • 1
  • 10
  • 15
0

I am afraid you cannot. The log parameters are defined early in the process, well before the variable of the job/transfo are read.

What you can do is to log on a tmp table, and let the caller decide if it has to copy the table and where with a straightforward transformation.

The drawback of this method is for concurrent jobs. The copy transformation then needs to take the decision based on the channel number.

AlainD
  • 6,187
  • 3
  • 17
  • 31