Hi @nicholas, you can read a pipe-separated values table with the CSV reader. When you add the reader to the workspace, open its parameters dialog and modify some parameters as shown below.
- Delimiter Character: | (pipe)
- Field Names Line: None (or blank in older version)
- Data Start Line: 1
The CSV reader with the configuration above generates default field names "col0", "col1", "col2", ... for each column and reads the data from the first line. You can then rename them with the AttributeRenamer if necessary.
Thank-you @takashi that did work.
But, I had a complication.
Initially, I had the parameters set to Field Names Line 1, Data Start Line 2, as this was the default.
I went back into the parameters and set them as you advised, but the field names persisted as being named after the data values of the first line.
So, I opened a brand-new blank FME workspace and created the reader, with the correct parameters. This time, FME named the columns col0, col1, etc...
So, for me, the fix was to start again in a brand-new workspace.
Thanks!
Thank-you @takashi that did work.
But, I had a complication.
Initially, I had the parameters set to Field Names Line 1, Data Start Line 2, as this was the default.
I went back into the parameters and set them as you advised, but the field names persisted as being named after the data values of the first line.
So, I opened a brand-new blank FME workspace and created the reader, with the correct parameters. This time, FME named the columns col0, col1, etc...
So, for me, the fix was to start again in a brand-new workspace.
Thanks!
Those parameters are related to the reader feature type configuration, you cannot change the feature type on the Canvas by modifying the parameters through the Navigator window.
As you did, replacing the existing reader with a new one with appropriate parameters would be a possible way. Alternatively, you can also update the existing feature type through the Workbench menu command "Update Feature Types".
- Check Workbench menu: Readers > Update Feature Types to start operations to update existing reader feature type(s).
- Click the eParameters] in the opened dialog to open the reader parameters dialog.
- Modify the parameters appropriately, then close the dialogs with hOK].
That's it.