Skip to main content
Best Answer

Fanout by row attribute value

  • July 23, 2019
  • 12 replies
  • 45 views

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?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

12 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • 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

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+46
  • Influencer
  • July 23, 2019

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

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+46
  • Influencer
  • July 23, 2019

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

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+46
  • Influencer
  • July 23, 2019

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

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+46
  • Influencer
  • July 23, 2019

I did! Same result unfortunately.

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


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

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+46
  • Influencer
  • July 23, 2019

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

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!