Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ShZ
Contributor II
Contributor II

Go through several outputs for each record

Hi everyone,

I am facing an issue as I am trying to build a flat file to import data in a software (standard format defined by the software editor). For each of my records, I have to go through several outputs I created and this order must be respected. At the moment, my job goes through the first output for all the records and then switches to the next output.

In my case, I would like it to go through each output, one by one, with one record before it switches to the next record.

How can I do this ? Please find attached a screenshot of my job.

Thanks.

 

Labels (1)
  • v8.x

1 Solution

Accepted Solutions
ShZ
Contributor II
Contributor II
Author

I finally managed to fix my issue by using tFlowToIterate + tJavaFlex before my tMap 😊

View solution in original post

5 Replies
jeoste
Creator
Creator

What are the condition in your tMap?

Are you trying to create a load balancing round robin with a tMap?

ShZ
Contributor II
Contributor II
Author

Hi Jeoste,

I have no specific condition in my tMap, I just created several outputs as I need to have different values in my output depending the line I am writing. For instance and to illustrate what I am trying to explain, I got one record having 3 amounts (amount without taxes, VAT amount, all taxes included amount). Each amount has to be written in a different line (also including account number which isn't the same for each line).

Here is a screenshot. Maybe I didn't do it the right or best way, I am using Talend for a few months now without having a proper training. Thank you for your understanding.

Shicong_Hong
Support
Support

Hello

From your job screenshot, I see you add different outputs for each record and add filter condition to filter rows. Can you please explain this requirement with an example?

"Each amount has to be written in a different line (also including account number which isn't the same for each line)."

Regards,
Shicong

ShZ
Contributor II
Contributor II
Author

Hello,

Yes I'll try.

For each source record, I have several informations (technical id, project number, amount taxes excluded, VAT amount, amount all taes included and some others but let's focus on that as this is the main reason why I need several lines in my output).

My target file contains accounting entries. For each source record, I need to have 4 lines in a defined order as you can see on my screenshot : 

  1. DebitCompteCharge (which concerns the entry for the amount taxes excluded)
  2. EcritureAnalytique (which is an additional entry for the previous one)
  3. DebitCompteTVA (which concerns the entry for the VAT amount)
  4. DebitCompteTTC (which concerns the entry for the amount all taxes included)

Let's take an example.

In my sourcefile, I could have :

Id Project Number Amount taxes excluded VAT Amount All taxes included amount
1sd5uhbd38wq47 AXM24001 100 20 120
95iygjbf21dr35et AXM24002 200 40 240

 

In my output, I want to have : 

Line 1 : AXM24001, 100

Line 2 (specific additional line to line 1) : AXM24001, 100

Line 3 : AXM24001, 20

Line 4 : AXM24001, 120

Line 5 : AXM24002, 200

Line 6 : AXM24002 (specific additional line to line 5), 200

Line 7 : AXM24002, 40

Line 8 : AXM24002, 240

Actually, the job goes through the first output for each source record and then switches to the second output and so on. It gives something like that  :

Line 1 : AXM24001, 100

Line 2 : AXM24002, 200

Line 3 (specific additional line to line 1) : AXM24001, 100

Line 4 : AXM24002 (specific additional line to line 5), 200

Line 5 : AXM24001, 20

Line 6 : AXM24002, 40

Line 7 : AXM24001, 120

Line 8 : AXM24002, 240

That's why I am asking if this is possible to configure my outputs to force my job to go through each output for one source record before to switch to the next source record.

I hope that's a bit more understandable. Thanks.

ShZ
Contributor II
Contributor II
Author

I finally managed to fix my issue by using tFlowToIterate + tJavaFlex before my tMap 😊