Skip to main content
Question

Read file with empty column name


geo-x
Participant
Forum|alt.badge.img
  • Participant

Dear community,

 

I need to read a txt file who have empty column names like that :

Sans titreHow can I manage my reader for having all columns ?

Thanks for your help.

9 replies

nielsgerrits
VIP
Forum|alt.badge.img+52

You can use a CSV reader and set the Field Names Line to 0, the Data Start Line to 1. Then all columns are named col0, col1, col2, etc. Then you can remove the header with a Tester (col1 = number) and use an AttributeRenamer to rename col0 to number etc.


geo-x
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • May 23, 2022

Hi @nielsgerrits​ 

If I do that, I've any data and I can't load my dataset.


nielsgerrits
VIP
Forum|alt.badge.img+52
geo-x wrote:

Hi @nielsgerrits​ 

If I do that, I've any data and I can't load my dataset.

Can you share a sample of your input? When I recreate a CSV of your screenshot I can configure the reader this way, so I wonder how your sample looks like.


geo-x
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • May 23, 2022
nielsgerrits wrote:

Can you share a sample of your input? When I recreate a CSV of your screenshot I can configure the reader this way, so I wonder how your sample looks like.

Yes of course


nielsgerrits
VIP
Forum|alt.badge.img+52
nielsgerrits wrote:

Can you share a sample of your input? When I recreate a CSV of your screenshot I can configure the reader this way, so I wonder how your sample looks like.

This is how it works for me.

Creator --> FeatureReader.

FeatureReader CSV Parameters:

CSV Parameters2021 workspace attached


geo-x
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • May 23, 2022
nielsgerrits wrote:

Can you share a sample of your input? When I recreate a CSV of your screenshot I can configure the reader this way, so I wonder how your sample looks like.

I'm jealous 😂

For me it doesn't works image


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • May 24, 2022
nielsgerrits wrote:

Can you share a sample of your input? When I recreate a CSV of your screenshot I can configure the reader this way, so I wonder how your sample looks like.

Can you check what is set in the Advance settings?


nielsgerrits
VIP
Forum|alt.badge.img+52
nielsgerrits wrote:

Can you share a sample of your input? When I recreate a CSV of your screenshot I can configure the reader this way, so I wonder how your sample looks like.

Are you using a dynamic input instead of a hard coded? Then you wont see values in the preview but the functionality works.

 

Also, when using a dynamic process, the attributes col1, col2, col3 will be unexposed so you need to expose them manually using the AttributeExposer.


geo-x
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • May 24, 2022
nielsgerrits wrote:

Can you share a sample of your input? When I recreate a CSV of your screenshot I can configure the reader this way, so I wonder how your sample looks like.

Yes, this is my settings :

image


Reply


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