Using tSortRow after reading multiple files to sort across all rows

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?


Accepted Solutions
Highlighted
Fifteen Stars TRF
Fifteen 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

All Replies
Highlighted
Fifteen Stars TRF
Fifteen 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
Fifteen Stars TRF
Fifteen 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
Fifteen Stars TRF
Fifteen 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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog