Error converting data, invalid type for parameter:

Six Stars

Error converting data, invalid type for parameter:

hi all,

 

I am trying to load table from mysql to redshift using dynamic schema. but Im getting the below error

"Error converting data, invalid type for parameter:3"

 

can someone what should i do to resolve this.

 

job design:

 

tmysqlinput with dynamic schema-->tmap-->tredshiftoutput with dynamic schema(settings create table and insert)

Twelve Stars

Re: Error converting data, invalid type for parameter:

run your job in debug mode to define the type who cause this trouble.
When using dynamic type I ll alwasy prefer to use sys table to build destination table before uploading data.

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Six Stars

Re: Error converting data, invalid type for parameter:

Thanks for your response!

Can you please help me with job design for creating table using sys table.

and I want to this creation of table dynamically for many tables..Kindly suggest!
Twelve Stars

Re: Error converting data, invalid type for parameter:

SELECT * FROM INFORMATION_SCHEMA.TABLES
will return metadata information on every table, while

SELECT * FROM INFORMATION_SCHEMA.COLUMNS
will return metadata information on every column.

then use create table syntaxe to dynamically build you table.

good luck

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Six Stars

Re: Error converting data, invalid type for parameter:

but how to generate "create statement" dynamically using this sys tables....should we have to write a java code or is there a straight forward way to do this in Talend using some components?

 

I wanted to do this for all tables before loading data in single job....using tablelist i can get the tables and then i can get the sys columns...but wht would be the next step to generate create statment using this?

 

please suggest!

Twelve Stars

Re: Error converting data, invalid type for parameter:

use tmap to create column definition. colname varchar(5)
use taggregate to list all coldefinition
then tDBsp to ececute Créate table xxx.

is it one shot?
in this case you may generate sctipt from MySQL user interface and sun it (with modification) on destination db

Francois Denis

Tag as "solved" for others! Kudos to thanks!

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch 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