Dynamic number of files output from a table?
Posted: Thu May 18, 2006 6:19 pm
Hi everyone,
I am quite new to DataStage and I am in the process of creating a job to extract data from an Oracle table, perform transformations and save it as a csv file. My problem is that a csv file has to be limited to x number of rows. If there are more than x rows in the table, then multiple csv files should be created each with a max size of x rows to store the entire table. So for example, if the table has 10 rows and the limit for a file is 5 rows then there should be 2 files created: file_1 (which contains the first 5 rows) and file_2 (which contains rows 6-10). Is there a way to do this dynamically in DataStage so that by setting the row limit for the file a different number of csv files are created depending on how many rows are in the table when the job is run?
Thank you in advance,
Liz
I am quite new to DataStage and I am in the process of creating a job to extract data from an Oracle table, perform transformations and save it as a csv file. My problem is that a csv file has to be limited to x number of rows. If there are more than x rows in the table, then multiple csv files should be created each with a max size of x rows to store the entire table. So for example, if the table has 10 rows and the limit for a file is 5 rows then there should be 2 files created: file_1 (which contains the first 5 rows) and file_2 (which contains rows 6-10). Is there a way to do this dynamically in DataStage so that by setting the row limit for the file a different number of csv files are created depending on how many rows are in the table when the job is run?
Thank you in advance,
Liz