#1 2012-05-30 09:23:32

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

discard non matching rows

HI,

Need help to implement the below.
1. we are getting data feed in a file
2. we just need to filter out rows with valid product codes
    - valid product codes are available in our database table
3. push the rows with valid product codes to the staging table

Thank you.

Offline

#2 2012-05-30 09:32:47

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: discard non matching rows

Hi

You might use tMap to do inner join.

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-05-30 10:31:50

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

Re: discard non matching rows

thanks Pedro, Inner join works perfectly well.

Offline

#4 2012-06-01 07:43:48

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

Re: discard non matching rows

Hi,
Is there a way to filter out measures with non zero rows only.

Thanks,

Offline

#5 2012-06-01 07:50:54

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: discard non matching rows

Hi

You might try the tFilterRows component. Or you set filter condition in tMap.

Regards,
Pedro


Only Paranoid Survive.

Offline

#6 2012-06-01 09:09:46

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

Re: discard non matching rows

Hi,
Tried tFilterRows component, thank you.

I fear some of the values are truncated while converting bigdecimal to int using one of the methods - toIntValue() or toIntValueExact().  So not sure how to proceed further.

Instead load the data into a staging table and get only non zero values in query panel.

Advice if the above method is right or could I have tune this better.

Thank you.

Offline

#7 2012-06-01 10:56:22

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

Re: discard non matching rows

input please

Offline

#8 2012-06-01 11:11:02

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: discard non matching rows

Hi

According to your description, the condition->operator should be 'not equal to'.

Could you show the code about methods toIntValue() or toIntValueExact()?

Regards,
Pedro


Only Paranoid Survive.

Offline

Board footer

Powered by FluxBB