Skip to main content

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.

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.


Hi @nielsgerrits​ 

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


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.


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


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


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


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?


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.


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