Skip to main content

Hello, everyone! I'm new to FME and seeking some guidance. I have a dataset with numerous columns, and I need to check the values of specific Boolean columns. While I'm aware of using the Tester transformer, it becomes cumbersome to manually create multiple OR and IF statements for each column I want to check.

 

I'm wondering if there's a way to define the columns I want to check in a separate file and have a transformer read that file to use those columns for checking. This would greatly simplify my workflow and make my life much easier.

 

If anyone can advise me on how to achieve this or suggest a better approach, I'd greatly appreciate it! Thank you!

Have you looked at the AttributeValidator?


Have you looked at the AttributeValidator?

Yes, I have. Do you mean that I have missed something in AttributeValidator which actually can be used in my situation? If yes, would you please advise me how to make it work?


Yes, I have. Do you mean that I have missed something in AttributeValidator which actually can be used in my situation? If yes, would you please advise me how to make it work?

If you just want to check the values of Boolean columns, the attribute validator will allow you to select multiple columns to validate with the same statement, no need to create multiple cumbersome test statements.

imageIf you want to actually define columns to check in a separate file for some other reason then it may not be the correct solution


Yes, I have. Do you mean that I have missed something in AttributeValidator which actually can be used in my situation? If yes, would you please advise me how to make it work?

Thank you for your response. My objective is to define the columns I want to check in a separate file, and then use a transformer to read that file and utilize those columns for checking.

 

In my data file, there are over 150 columns, with approximately 120 of them being boolean columns. From these boolean columns, I would like to check around 100 specific ones. Additionally, the number of columns in the file may grow as more projects are created. Although I understand that the file's structure may not be optimal, it is provided by other parties, and I have no control over its design.

 

Given this situation, the most straightforward approach for me is to create another file that stores the names of the boolean columns I want to check. I can then use this configuration file to efficiently check all the columns I need. Extracting the desired columns from the CSV file is not challenging since the ones I want to check are located at the end of the file.

 

By implementing this method, I can easily manage the columns I want to analyse, and it allows for flexibility as new projects are introduced. Thank you for your understanding and support in this matter.


Reply