DataBase loading

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

DataBase loading

Post by kennyapril »

A file is sent to the server every week and the records from the file should be loaded into a table.

Suppose first week there are 100 records second week there may be more than that around 120 to 140.

before loading into the table we need to find out only the new ones and load them I mean append to the table.

So my idea is to do a lookup with the table(loaded earlier) and the file and the rows which are rejected are loaded in the table.

Is this a good idea,please suggest me
Regards,
Kenny
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yup, good idea. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Post by kennyapril »

thanks,

When I do a look up there should be a stream and a reject.
Can I link only a reject from the lookup to the table with out the stream link?
Regards,
Kenny
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As far as I recall, yes. Have you tried it yet?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Post by kennyapril »

I tried to use only a reject as said in my message but I see an error for that which says
"An UnIdentified error has occured"


please suggest!!
Regards,
Kenny
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can you post the details of your job design, please? And you get this error when, exactly? Runtime?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Post by kennyapril »

The job design is

ftp stage------>transforrmer(stream to lookup)---------->lookup(and the reference isTable)-------->(reject from lookup)Table


The ftp stage is used to read the data from an other server and file comes every week to that server and after reading the file and transform according to the requirements I had to do a lookup with the table and load the rows which are not loaded last week.
just like the rows which does not match with the last weeks data are appended.

so I used only a reject fromt he look up which gives only the records which are not matched.

this error occurs when compiling the job.
the options I used in the properties of lookup are reject and reject.
Regards,
Kenny
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Can you create a simple job having a look-up with reject link and otuput link and check whether you can compile there. If you can't compile there, then it will be a patch issue. We also had same issue when we use reject link from LookUp. After patch fix, it went off.
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Post by kennyapril »

When I use the output link and reject link that works but my job is to get only the rejected records so I used only the reject link bot the output link.

so I got this error.

Is there a stage other then I look up stage to get only the rejected records as
I need only the rejected records.
Regards,
Kenny
thompsonp
Premium Member
Premium Member
Posts: 205
Joined: Tue Mar 01, 2005 8:41 am

Post by thompsonp »

Instead of using the reject link, why not set the lookup to 'continue' when no match is found.
Then filter the rows that out the rows that matched and only process the new ones.
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Post by kennyapril »

thanks,

I see only two conditions in the lookup
one is condition not met and other one lookup failure
do I need to use continue for these two?
or do I need to assign a new condition, please suggest how can I do that?
Regards,
Kenny
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

For LookUp failure keep it as continue
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Post by kennyapril »

so to get the rejected rows....Is it continue for the two conditions?
Regards,
Kenny
nitkuar
Participant
Posts: 46
Joined: Mon Jun 23, 2008 3:09 am

Post by nitkuar »

kennyapril wrote:so to get the rejected rows....Is it continue for the two conditions?
it should be continue for 'Lookup Failure' dropdown. anyway if you haven't given any condition in lookup link other dropdown 'Condition not met' value won't matter.
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

Lookup requires a stream output, but does not require a reject link. If you only have a reject link and no stream output the compiler will complain. Send the lookup success rows to a copy with no output or a seq file stage and write to /dev/null or some such thing.
Post Reply