Seven Stars

Using tSortRow after reading multiple files to sort across all rows

I have a directory of files which I iterate through and output to 1 master file. I would like to sort all the rows in a particular order before outputting to a file but because I'm iterating through multiple files my output is automatically separated into batches based on the flow of rows through my job.

 

Is there a way to sort all the rows without having to read in the master file?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: Using tSortRow after reading multiple files to sort across all rows

Hi,

 

tFileList --> tFileInputDelimited --> tHashOutput

|

+ on Subjob OK

|

tHashInput --> tSortRow --> tFileOutputDelimited (sorted with all records)

 

Hope this helps.


TRF
6 REPLIES
Forteen Stars TRF
Forteen Stars

Re: Using tSortRow after reading multiple files to sort across all rows

Hi,

 

tFileList --> tFileInputDelimited --> tHashOutput

|

+ on Subjob OK

|

tHashInput --> tSortRow --> tFileOutputDelimited (sorted with all records)

 

Hope this helps.


TRF
Forteen Stars TRF
Forteen Stars

Re: Using tSortRow after reading multiple files to sort across all rows

Does this answer solved your case?
If so, thank's to close the subject.

TRF
Seven Stars

Re: Using tSortRow after reading multiple files to sort across all rows

In this case would tFileList trigger SubJob Ok when all files have been read or after each file was read?

Community Manager

Re: Using tSortRow after reading multiple files to sort across all rows

The subjob starts to work only when all files are read.

----------------------------------------------------------
Talend | Data Agility for Modern Business
Forteen Stars TRF
Forteen Stars

Re: Using tSortRow after reading multiple files to sort across all rows

"on Subjob OK" means "when the subjob is finish with success", so in this case when all the files have been read.


TRF
Moderator

Re: Using tSortRow after reading multiple files to sort across all rows

Hello,

Here is a document about https://community.talend.com/t5/Design-and-Development/What-is-the-difference-between-OnSubjobOK-and...

Hope it will be helpful.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.