Page 1 of 1

How to call a value from Text file?

Posted: Wed Dec 06, 2006 12:18 am
by skumar
Hi all,

I have a requirement for incremental load in such a way that i have to pass the records from the particular timestamp and i am passing that particular timestamp to a sequential file and in the job when i am picking the data from the source table i want the data greater than the time stamp that i have stored in the sequentail file.I am confused with how to call the timestamp in the sequential file when we are using the source stage(i am using user defind sql) .............


Thanks in advance...............

Regards,
Skumar.

Posted: Wed Dec 06, 2006 12:24 am
by thebird
You can define the timestamp as a job parameter in your job and then use it in the user SQL query inside the source stage.

You can write a BASIC routine (to be used in the sequence) which will parse the sequential file and then pass the Timestamp inside as a parameter to the extract job.

If you do a search in this forum, you'll get more details on the routine.

Aneesh

Posted: Wed Dec 06, 2006 12:47 am
by ray.wurlod
You appear to be confused. At least you've confused me. You are using user-defined SQL to interrogate a text file? Is this perhaps via an ODBC stage referring through an ODBC driver for text files?

A smarter mechanism would be to read the entire file into your job using a Sequential File stage, then use a constraint expression in a Transformer stage to filter the required records. The timestamp can be a job parameter reference or even hard coded in the constraint expression.