I need to migrate a string field from a mysql table (string type) to a Postgres inet type field. The tPostgresqlOutput is reading the type as object and choking on insert.
I tried to drop a constant into the right side of the Tmap, but that didn't work either. Tested it using direct SQL and it worked fine.
How do I format a string for use as something the Talend thinks is an Object type field? or how to i tell Talend to treat it like a string?
Here's a script to test it:
create table inet_test1 (id int, phone varchar(20), Ip_address varchar(20));
create table inet_test2 (id int, phone varchar(20), Ip_address inet);
insert into inet_test1 values (1, 'Phone1', '192.168.0.10');
insert into inet_test1 values (2, 'Phone2', null);
insert into inet_test1 values (3, 'Phone3', '192.168.0.30');
tPostgresqlInput -> tMap ( map all fields) -> tPostgresqlOutput
(I did the if null check on the mapping too)
Run...
Boom! no workee.
Hi, Have you checked Windows-->Preference-->Talend-->Metadata of TalendType and see mapping_Postgres.xml to define the schema correspond with the table in DB.(About the data type mapping between Talend type and db type)? Best regards Sabrina