Issue in converting Binary datatype(BLOB in mysql) to String

One Star

Issue in converting Binary datatype(BLOB in mysql) to String

Hi,
  We are retrieving data using tmysqlinput. For a particular column we want to convert the binary(BLOB datatype in mysql DB) datatype to string and store it into mysql database.Please let us know how to convert it.
Thanks,
Moderator

Re: Issue in converting Binary datatype(BLOB in mysql) to String

Hi,
Using a tMysqlInput to read the data from mysql table, select 'byte[]' from the Type list and select 'Blob' from the DB type on the schema of tMysqlInput, and then convert byte[] to string on a tMap, eg:
tMysqlInput--main--tMap--out1--tLogRow

on tMap, set the expression of column in the output table:
new String(row1.blobColumnName)
Let us know if it is OK with you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Issue in converting Binary datatype(BLOB in mysql) to String

Hi,
 We have tried as per your suggestion we got [B@5f341870 like this records.but that column contains 16 digits uuid.
Thanks,