[resolved] data trim column while delete

Six Stars

[resolved] data trim column while delete

Hii,
I have a job in which while taking the input from mysql i check the option of trim all string/char columns.
i have a mysql output component where delete is option.
my prob is i have trimmed all the cols so my key column for delete is also trimmed
now when i delete records the key value doesnt match as it has been trimmed.
i can do it by not trimming key column in the input but is there any other workaround for this.
regards,
djugal

Accepted Solutions
One Star

Re: [resolved] data trim column while delete

I've found in those circumstances it is best to do the delete first without any trimming, then do the insert/update using trimming in a second process.

View solution in original post


All Replies
One Star

Re: [resolved] data trim column while delete

Hi Djugal
Not trimming key column is the most convenient way.
Regards,
Pedro
Six Stars

Re: [resolved] data trim column while delete

ok thanks,
just curious, if additional columns in additional settings of mysqloutput could be of any help.
regards,
djugal
One Star

Re: [resolved] data trim column while delete

Why would you want to trim it?
One Star

Re: [resolved] data trim column while delete

Hi Djugal
The Additional columns option allows you to call sql functions to perform actions on columns.
In my opinion, it is not appropriate here.
Regards,
Pedro
Six Stars

Re: [resolved] data trim column while delete

@janhess - i want to trim all columns as i am inserting some acceptable data as well as rejecting data which dont meet criteria, all my reject rows are fed to dboutput where rows r deleted, all accepted cols are fed into another dboutput where they are inserted which has to be in trimmed format
@pedro - thanks
regards,
djugal
One Star

Re: [resolved] data trim column while delete

I've found in those circumstances it is best to do the delete first without any trimming, then do the insert/update using trimming in a second process.

View solution in original post

Six Stars

Re: [resolved] data trim column while delete

k will try tht thks janhess

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