Skip to main content

I’m fairly new to FME and need help to get started on a workbench. I have a text file i need to convert into a readable format. Each line has information about a specific device and should be parsed into separate columns. The blank spaces also need to be removed. What transformer should I use? Any help is appreciated!

Hi @rbrown 

 

Do you have a sample data to share?

 

Remove blank space I suggest you to use the transformer AttributeTrimmer.


Use a CSV Reader instead.   It will parse any text file by any custom Delimiter character input into the Parameters.  The sample preview looks like a space or Tab character is used.

It sometimes needs some trial and error with the Advanced Parameter settings, but it should give you what you want.  One Parameter to be careful of is “Scan for Type” is left as “Yes”.  If it determines the column is numeric, it will drop the leading zeros on this column, and can see that you do have these types of fields in the sample data.


@bwn , that worked. Thank you! The txt file did not have headers so I also had to set the 'Field Names Line' setting to None.

 @danilo_fme thanks for your suggestion too! I’ve attached a copy of the data if you’d like to use it. 


Hi @rbrown 

 

Thanks for your data.

 

I created a Workspace that eliminate these blank spaces and generate a attributes.

 

Attached.

 

Thanks, Danilo!


Another option is to use a CAT (Column Aligned Text) Reader

This will eliminate the blank spaces without anything further required


Reply