Page 1 of 1

Need to read a column from a file and use as a parameter

Posted: Fri Aug 19, 2011 8:46 am
by _chamak
Hi,

I have a requirement to read the max month end date from the target and accordingly i need to put the data from source.

For eg: In the target if I have 2011-09-30 date as the max month end date, then I need to pull only the data where the month end date in the source is greater than 2011-09-30. The source data is very huge.

What i did now is read the entire source data, lookup on the target table, pull the max month end data and filter. But this is taking a long time as the soruce data is hude.

Source : Sql Server
Target: Oracle.

Is there a way to pull the data from source by filtering the source sql itself.

what i thought was
Create a after sub routine, and in the subroutine take the max key and write to file. When the job runs for the next time, i want to read the file and use the max date in the file and pass it as a parameter in the source sql. Can some one know how to read a file and pass the value from the file as a parameter.

Thanks in advance
Can we read a file and use

Posted: Fri Aug 19, 2011 8:52 am
by arvind_ds
Use execute command activity in the job sequence to read the file.Store the value into a variable activity stage and then pass that value to the subsequent job in your workflow.

HTH

Posted: Fri Aug 19, 2011 9:03 am
by chulett
viewtopic.php?t=141746

Either do the 'max key' work in the current job or a separate followup job, I would consel against the 'after job routine' approach.

Posted: Fri Aug 19, 2011 9:26 am
by _chamak
arvind_ds wrote:Use execute command activity in the job sequence to read the file.Store the value into a variable activity stage and then pass that value to the subsequent job in your workflow.
Let me try it. Thanks a lot for your quick response