Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
param123
Creator
Creator

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)

Labels (2)
5 Replies
fdenis
Creator III
Creator III

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.
param123
Creator
Creator
Author

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!
fdenis
Creator III
Creator III

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
param123
Creator
Creator
Author

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!

fdenis
Creator III
Creator III

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