Skip to main content
Solved

Fanout by row attribute value


Forum|alt.badge.img

I need to make an export of my data with a format like this:

 

I want the output to be in seperate files (fanout) based on a single row value per group

I grouped the data by groups, so each group has unique attributes. How I can fanout and get the filename to be a single row attribute? ('bestandsnaam'), so in this case '504.pfrl'

 

Best answer by ebygomm

What does your data look like before you explode the attributes?

View original
Did this help you find an answer to your question?

12 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • Best Answer
  • July 23, 2019

What does your data look like before you explode the attributes?


Forum|alt.badge.img
  • Author
  • July 23, 2019
ebygomm wrote:

What does your data look like before you explode the attributes?

Before it looks like this:This would be easy to fanout by 'bestandsnaam', but then I wouldn't knwo how to produce a layout like this:


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • July 23, 2019
miob wrote:

Before it looks like this:This would be easy to fanout by 'bestandsnaam', but then I wouldn't knwo how to produce a layout like this:

You should be able to just produce a text_line_data attribute with multiple lines and the correct layout write to a text file, then fanout on 'bestandsnaam'

e.g.


Forum|alt.badge.img
  • Author
  • July 23, 2019
ebygomm wrote:

You should be able to just produce a text_line_data attribute with multiple lines and the correct layout write to a text file, then fanout on 'bestandsnaam'

e.g.

Thank you, that seems to get me closer. I mad a text line attribute like you described:

 

 

But how do I write it? I tried using a generic writer set to .txt and manually selecting my textline-attribute:

 

 

But this results in an empty .txt file


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • July 23, 2019
ebygomm wrote:

What does your data look like before you explode the attributes?

I would use the text writer and the attribute needs to be called text_line_data. I typed it wrong in my answer originally.


Forum|alt.badge.img
  • Author
  • July 23, 2019
ebygomm wrote:

I would use the text writer and the attribute needs to be called text_line_data. I typed it wrong in my answer originally.

That brought me even further, almost there! The only thing is that 'enter' does not seem to work. tried both Newline (/n) and Carriage return (/r):

 

 

but everything is written away as 1 line without enters:


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • July 23, 2019
miob wrote:

That brought me even further, almost there! The only thing is that 'enter' does not seem to work. tried both Newline (/n) and Carriage return (/r):

 

 

but everything is written away as 1 line without enters:

You will need to enter carriagereturns using the special characters option on the left in the text editor


Forum|alt.badge.img
  • Author
  • July 23, 2019
ebygomm wrote:

You will need to enter carriagereturns using the special characters option on the left in the text editor

I did! Same result unfortunately.


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • July 23, 2019
miob wrote:

I did! Same result unfortunately.

Your screen shot shows Line Feeds not carriage returns...


Forum|alt.badge.img
  • Author
  • July 23, 2019
ebygomm wrote:

Your screen shot shows Line Feeds not carriage returns...

I know, I tried both since carriage returns didn't work:

result:

 


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • July 23, 2019
miob wrote:

I know, I tried both since carriage returns didn't work:

result:

 

Ah, i think it is because if you are viewing in Notepad you need both the line feed and the carriage return. Viewing text files in other editors will show slightly different output.


Forum|alt.badge.img
  • Author
  • July 23, 2019
ebygomm wrote:

Ah, i think it is because if you are viewing in Notepad you need both the line feed and the carriage return. Viewing text files in other editors will show slightly different output.

Yes!! You are my hero! Thank you so much!

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings