Sometimes you might come across data that is store in in binary form in a table. To convert this data you chose one of the following approaches:
Convert directly using SQL in the database input step
One quick method would be to use the CONVERT or CAST function (test which one works best for you):
CONVERT(prodCode USING latin1) AS prodCode
CAST(prodCode AS SIGNED) AS prodCode
Select Values ... step
Go to the Meta-data tab, choose your binary field and set Binary to Normal to Y.
Note: You can only use one tab at a time in the Select Values ... step!
Modified Java Script Value Step
If you have to import the binary data into Kettle, you can use this approach:var string = new Packages.java.lang.String(yourField, "UTF-8");
0 comments:
Post a Comment