Page 1 of 1

How to find First recharge?

Posted: Fri Apr 19, 2013 10:01 pm
by pkll
I have two tables

Recharge_Details
SUBSCRIBER_ID,RECHARGE_DATE_TIME,SERIAL_NUMBER.

First_Rechrge
SUBSCRIBER_ID,RECHARGE_DATE_TIME,SERIAL_NUMBER.

Compare the Recharge_Details SUBSCRIBER_ID with
first_recharge table SUBSCRIBER_ID (at initial level First_Recharge
table is blank) , if SUBSCRIBER_ID
already present in First recharge table ignore else insert SUBSCRIBER_ID into First_recharge table

I need to capture first recharge of SUBSCRIBER_ID...

Posted: Fri Apr 19, 2013 10:23 pm
by ray.wurlod
You have a couple of choices, effectively the same logically.

Perform a lookup against first recharge table with Lookup Failed rule set to Continue, then test in a downstream Transformer stage whether the columns returned from the reference input are NULL.

Or perform a left outer join, with recharge details as the left input, then process similarly in a downstream Transformer stage.

Getting a premium membership would be good, too.

Posted: Fri Apr 19, 2013 11:50 pm
by pkll
Hi Ray,

I have written query in oracle connector

SELECT SUBSCRIBER_ID,RECHARGE_DATE_TIME,SERIAL_NUMBER FROM Recharge_Details ORDER BY RECHARGE_DATE_TIME;

After that i have taken remove duplicate stage .In Removeduplicate stage key = SUBSCRIBER_ID
Duplicate to Retain = First.

Can you suggest me above process is correct or not?

Posted: Sat Apr 20, 2013 6:28 am
by ray.wurlod
Yes and no. According to the specification in your original post you also have to undertake some kind of checking/processing against the FIRST_RECHARGE table. Your more recent post on this thread seems to omit this requirement altogether.

Posted: Sat Apr 20, 2013 6:42 am
by chulett
pkll wrote:Can you suggest me above process is correct or not?
Can you suggest us if above process seemed to work or not? :?

Posted: Sat Apr 20, 2013 6:44 am
by chulett
<found at the bottom of the post>
ray.wurlod wrote:Getting a premium membership would be good, too.
:wink: