Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Update a column values from a CSV or text file before inserting/loading it on a table

Hello,

 

I would like to ask if it is possible to update a column values before inserting/loading it onto a table?

Something like in a typical MySQL database trigger, a trigeer before insert

 

for each row
begin
if (NEW.Col_name = 'values1'l) then
set NEW.Col_name = 'values1updated1'; end if;
if (NEW.Col_name = 'value21'l) then
set NEW.Col_name = 'values2updated'; end if;

if (NEW.Col_name = 'values3'l) then
set NEW.Col_name = 'values3updated'; end if;


end
//
delimiter ;

 

 

Or is there any different way to do this?; As I have 1 column with 3 different values depends on the action,  that should be updated, before placing/inserting /loading the data on the target destination table to avoid "Data Column Values is too long"  as I set the standard data types/sizes on the destination table, with a CHAR(1) and the data from the CSV file having CHAR(3).

 

Thank you very much for any idea or a solution.

 

Cheers

 

 

Labels (4)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Pass your data into a tJavaRow or a tMap before to send them to your DB.
This is how it works with Talend DI.

View solution in original post

2 Replies
TRF
Champion II
Champion II

Pass your data into a tJavaRow or a tMap before to send them to your DB.
This is how it works with Talend DI.
Anonymous
Not applicable
Author

Thank you Sir @TRF! Smiley Happy