Skip to main content
Question

How can i make a translation fail on missing input PostgreSQL table?


roman00
Participant
Forum|alt.badge.img

When reading a PostgreSQL table with FME Workbench (2023.1) that has been droped (or renamed) before, the error in the logfile looks like:

"Error executing SQL command ('select * from "schema"."table" where false limit 0'): 'ERROR: Relation »schema.table« does not exist".

Despite of this error the logfile says that the "Translation was SUCCESSFUL". (The parameter "ignore failed reader" is already set to NO.) I need to know, if a table has been deleted (or renamed).

 

So, how can i make the translation fail on missing input PostgreSQL table instead?

 

 

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

I can think of different solutions with their own disadvantages.

You can force a workspace to fail using a Terminator.

  • Check with information_schema.tables if the table you want to read exists before you read it.
    • Requires a SQLExecutor and a tester for each FeatureReader.
  • Use the NoFeaturesTester from the FME Hub to check for output.
    • This only works when the required table always has records or you will get false positives.

roman00
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • September 5, 2023

Thanks for your answer. If it was just a single workbench, these solutions would be fine. My problem is that I have many workbenches with many PostgreSQL tables and I don't want to customize all of them.

I'm more looking for an option like "ignore failed featuretypes" (same as "ignore failed readers") that I can set to NO so that the workenches will fail if a featuretype is missing...

 


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