Despite the name a CSV file does not have to be comma separated.
FME is capable of recognizing a file with any separator or delimiter character, as long as you specify that character in the settings box.
The CSV reader is also capable of handling data consisting of fixed width columns without a separator, provided that the character spacing the data (usually a space character) does not appear in the data itself. Simply use the parameter 'Remove Duplicate Separators' to achieve this. An alternative method is to use the Textfile reader and an AttributeSplitter transformer.
There are several example workspaces for reading CSV data on fmepedia, including:
Where line is an ID number for the feature which is listed against each coordinate.
If there is only a single coordinate for that feature it becomes a point feature.
If there is more than one coordinate for that feature it becomes a line feature.
If the final coordinate matches the first it becomes a polygon feature.
In this example CSV file there are 3 lines, 1 point and 1 polygon.
The difference with this CSV file is that there is no unique ID number - each line is designated by a point type. START indicates the start point of a line, VERTEX indicates a vertex and END indicates the end point of the line.
The start point doesn't need to be indicated so we change it to VERTEX to be consistent with the vertices.
The end point needs to be different, but also included as a vertex, so a copy is made of it.
One end-point copy is given a pen number of VERTEX and the other retains END.
PointConnector will then function correctly - although the end-of-line markers are output as 2 extra points and should be ignored.
Because of this it won't process point features.
The processing step puts the points out of order, so a Counter transformer is used prior to processing, and a Sorter transformer prior to the PointConnector to get them back into the correct order.
The difference with this CSV file is that the point ID numbers are not consecutive within the line - each point has an ID number and a pointer to point to the previous and next points in the line.
This sort of task normally needs some form of looping/iteration; which wasn't possible with Workbench at the time this was created. This workspace simulates this iteration through a set of features by creating a copy of each feature for each iteration you need.
We create a list of all the points for a feature using the FeatureMerger and then create a separate feature that contains the full list using a ListElementCounter/Cloner. Then Global Variables are used to define the next point to be read and that feature extracted from the list of the next feature with a ListIndexer. Note the use of the function @GlobalVariable(GV) in the ListSearcher to determine which element in the list to read.
NB: It all works only because FME works by processing a single feature as far as possible in the workspace. I don't know if many people really understand that concept, but it's the entire basis for this workspace. One feature defines a global variable containing the next point ID and the next feature uses that variable to determine which point to use in the list. In the same vein the StatisticsCalculators in there aren't needed for calculating statistics; they're used to force FME to stop at that point and gather all features together (in FME2007 you could use the FeatureHolder).
No one has followed this yet.