Skip to main content
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.

  • December 23, 2022
  • 3 replies
  • 18 views

Forum|alt.badge.img+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?

Best answer by markatsafe

@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

View original
Did this help you find an answer to your question?

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

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.


Forum|alt.badge.img+2
  • Best Answer
  • December 29, 2022

@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


Forum|alt.badge.img+1
  • Author
  • December 29, 2022

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings