Sequential File Stage

If are given a list of .txt files and asked to read only the first 3 files using seq file stage. How will you do it?

Questions by srikanth.ds   answers by srikanth.ds

Showing Answers 1 - 3 of 3 Answers

To read given number of files, one can use follow below steps:
1. In the sequential file stage, Use Read Method as Specific File(s).
2. Now in the file text field, Put below command.
`ls <File Path>/<File Pattern>* | head -<Number of files to be read>`

This will read given number of files.

For example, I had 5 files, with similar pattern (as date*.txt), in working folder say "/data/working/". If we want to read three files out of these five files, one can use following command:
`ls /data/working/date*.txt | head -3`

Hope this helps.

Thanks,
Brajesh.

HI,
In sequential file we can take a single file byusing the file as Specifyed file.

But we can take the more than one file use File Pattern with different file names.

Metadata must be same.

  Was this answer useful?  Yes

matan

  • Nov 16th, 2012
 

In sequential file we can take a single file by using the file as Specified file.

But we can take the more than one file use File Pattern with different file names.

Metadata must be same.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions