Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to convert incoming data from DB2 as source into Kafka as Target.
The dates in DB2 are coming in as Numeric (8,0) in the Task when I select the tables
They are defined as numeric with values as YYYYMMDD or 99999999
I want to define the function mapping using one of the date time functions to translate the inputs coming in as 20220525 or 99999999 into valid date format. I couldn't find an example of what the modifier should be if using these functions
Thank you
Sorry, I wasn't clear.
As you said, if I test in UI, I get the correct result
But if I check the Kafka message, it is like this
Ok. I see what you mean with the backslash.
It kinda makes sense considering that what you requested to be constructed will be enclosed in double-quotes. So how would a parser know that the double quote before say "CompanyCode" is NOT the end the value but part of the value - it is told this using the escape.
Best I know the 'normal' way to generate an additional key is not a structure but just a concatenation of values, possibly in fixed length increments (add X spaces and substring) or with separator or just glued together:
* substr ( $COMPANY_CODE || ' ', 1, 10) || trim($MASTER_ID)
* $COMPANY_CODE || '~' || trim($MASTER_ID)
* $COMPANY_CODE || trim($MASTER_ID)
fwiw,
Hein.