Search code examples
pentahokettle

How to specify a constant as the target value for a column in KTR


I am trying to set up a simple KTR to copy over data from one table to another. In the target table, I have a column called JobId which is not mapped to anything in the source table (the idea is to capture the KTR job id in this column). I notice that if I do not include this column in the mapping, then the SQL generated drops the column from the table altogether (this happens irrespective of whether I set the update flag to Y or N), which is not what I want. I would like to know how to set the target column to a constant or not alter it altogether.

Thanks


Solution

  • Use the add constants step, or the get variables step. In the get variables you can get the interal.transformation name variable if you like.