cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Write(load) data into flat file.

mohan_salla
Participant
0 Likes
1,640

Dear Experts,
I have to load the data into a flat file and atleast leave first 4 rows blank(I meant say that Data should be written

into file from 5th row onwards in flat file).See below screenshot.


Could anybody advise me asap.

Thanks&Regards
Mohan

View Entire Topic
Rishabh_Awasthi
Active Participant
0 Likes

Hi Mohan,

Skip rows opton of the File Format would not serve the requirement as it will skip the specified number of rows of the existing rows of the data being loaded.

Keep the data load flow normal with the Skip row header as NO and Load the data into a file .

After the load into the file join a Script to the data flow executing unix command to prepend the new line to the existing file.

Flow:

Dataflow--->Script.

Unix script can perform following steps :

  • Move the content of the existing file with data to a temp file,
  • add the required number of line to the existing file,
  • append the data from the temp file.

But this scenario could take time if the file being loaded is huge.

So better would be to get a Unix script to prepend lines to existing file without using the temp file.

Regards,

Rishabh