Nest multiple headers-details from sql tables to delimited file

Highlighted
One Star

Nest multiple headers-details from sql tables to delimited file

Good evening. I'm extremely new here and relatively new to Talend. There's a problem I'm facing and I can't see to find a way to solve it:

 

I need to output an X number of columns from [Header_Table] to a file, then a bunch of columns from its corresponding [Detail_Table] underneath them, then the rest of the columns from [Header_Table] underneath those. In essence it's like this:

 

HDR1 Row 1: {HDR_Field_1}~{HDR_Field_2}~{HDR_Field_3}~{HDR_Field_4}

DTL Row 1: {DTL_Field_1}~{DTL_Field_2}~{DTL_Field_3}

DTL Row 2: {DTL_Field_1}~{DTL_Field_2}~{DTL_Field_3}

...

DTL Row n: {DTL_Field_1}~{DTL_Field_2}~{DTL_Field_3}

HDR1 Row 2: {HDR_Field_5}~{HDR_Field_6}

 

HDR2 Row 1: {HDR_Field_1}~{HDR_Field_2}~{HDR_Field_3}~{HDR_Field_4}

DTL Row 1: {DTL_Field_1}~{DTL_Field_2}~{DTL_Field_3}

DTL Row 2: {DTL_Field_1}~{DTL_Field_2}~{DTL_Field_3}

...

DTL Row n: {DTL_Field_1}~{DTL_Field_2}~{DTL_Field_3}

HDR2 Row 2: {HDR_Field_5}~{HDR_Field_6}

 

etc etc.

 

Has anyone ever had to do something similar before? Thanks in advance!

Moderator

Re: Nest multiple headers-details from sql tables to delimited file

Hello,

What's your input source? Is it .sql file? Could you please give us some sample about it?

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

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read