Skip to main content
Solved

Force error when source table doesn't exist or attributes are missing

  • January 6, 2021
  • 2 replies
  • 110 views

tfcw
Contributor
Forum|alt.badge.img+1
  • Contributor
  • 13 replies

I have a lot of workspaces running off a lot of Oracle tables in a lot of different databases. When I run a workspace in which an attribute defined in a Reader doesn't exist in the source, I get this message in the log:

2021-01-06 11:31:24|   1.4|  0.0|WARN  |Oracle Reader: Column 'COLUMN_2' specified on Feature Type but does not exist in table 'TEST' and will be ignored

When I run a workspace in which the table no longer exists, or I lost access to it, I get no message at all and the workspace just treats it as reading 0 rows from the source.

 

Is there a way to configure FME so that these cases will cause the translation to fail? I know I can do post reading checks to make sure rows came through and each attribute isn't missing, but I have a whole lot of these so it would be nicer if there was just a switch I could flip somewhere.

Best answer by markatsafe

@tfcw​ There is no simple switch I'm afraid. But we recently presented a webinar on these very ideas.: Database Tips & Tricks: Strategies for Detecting and Handling Schema Drift. So have a flick through that to see if there is anything that helps.

As a starting point, FeatureReader returns both the features and the schema metadata, so comparing those will get you part of the way.

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.

2 replies

Forum|alt.badge.img+2
  • 1891 replies
  • Best Answer
  • January 6, 2021

@tfcw​ There is no simple switch I'm afraid. But we recently presented a webinar on these very ideas.: Database Tips & Tricks: Strategies for Detecting and Handling Schema Drift. So have a flick through that to see if there is anything that helps.

As a starting point, FeatureReader returns both the features and the schema metadata, so comparing those will get you part of the way.


david_r
Celebrity
  • 8392 replies
  • January 7, 2021

If you need to stop on missing input tables, make sure that "Ignore failed readers" is set to NO under Workspace Parameters / Translation.