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
  • 50 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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • December 24, 2022

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
  • 1891 replies
  • 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
  • 7 replies
  • 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!