String (UUID) from MSSQL to BINARY / Byte[] MySQL

Highlighted
Four Stars

String (UUID) from MSSQL to BINARY / Byte[] MySQL

I have mysql and collum binary(16)
Input (Object/uniqueidentifier) - tMap - Output (BINARY/Byte[])



Tue Feb 04 16:38:36 EET 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Exception in component tMap_1 (Transactions)
java.lang.NumberFormatException: For input string: "331FD492-50CA-4CA1-9706-827D660CDEB1"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Byte.parseByte(Byte.java:149)
	at java.lang.Byte.parseByte(Byte.java:175)
	at routines.system.TypeConvert.String2byteArray(TypeConvert.java:4391)
	at routines.system.TypeConvert.Object2byteArray(TypeConvert.java:3495)
	at cns.transactions_0_1.Transactions.tDBInput_1Process(Transactions.java:1808)
	at cns.transactions_0_1.Transactions.runJobInTOS(Transactions.java:2542)
	at cns.transactions_0_1.Transactions.main(Transactions.java:2392)

 

I add after tMap  block "tJavaRow":
output_row.Id = String.getBytes(input_row.Id);

 

Run and have error: 

 

Screenshot_1.png

 


My output_mysql  attachment

 
Highlighted
Four Stars

Re: String (UUID) from MSSQL to BINARY / Byte[]

IF:
output_row.Id = input_row.Id.getBytes();

result:

Screenshot_2.png

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog