Solved

I have a workspace that reads a .csv file. I recently ran across a problem where the reader output had no outputs on some User attributes. I found that I had the wrong case on the headers of the csv file.

  • 23 December 2022
  • 3 replies
  • 7 views

Badge +1

Is there a way to:

  1. make a reader case-insensitive?
  2. Change the case of the headers?
  3. Stop the workspace and generate an error if the wrong case is encountered in the file headers?
icon

Best answer by markatsafe 29 December 2022, 19:04

View original

3 replies

Userlevel 5
Badge +25

Regarding #3: you could use a Schema reader to read the csv schema and then compare it to what it should be. If it matches, you can use a FeatureReader to read the actual data.

 

It may also be worth exploring the workflow before the data gets to FME, if there's case differences being introduced there that's obviously not a good thing in terms of consistency.

Badge +2

@dutchtower​ There's a webinar on schema drift that might give you some ideas - including using the SchemaScanner or FeatureReader to get the schema and compare it to an old one.

But... when you add a CSV reader to your workspace, under the reader parameters, Advanced, Field Names, try setting Case Sensitive Field Names: No

Badge +1

I added a new CSV reader and set the Case Sensitive Field Names to No and replaced the original CSV Reader and SHAZAAM! it worked. I'll take a look at the webinar Mark mentioned and see about adding a Schema drift alert. Thanks, everyone!

Reply