Skip to main content
Question

Is it possible to extract numbers from the FME log whilst running the translation

  • January 31, 2018
  • 2 replies
  • 12 views

I've got a workbench set up with a SystemCaller to run my saved SQL query in PostGIS - using one table with unique IDs (let's call it "delete table") to remove records from 6 other tables in my PostGIS database based on the same IDs. I then want to double check whether the query was successful and compare it to the number of records in the "delete table" before moving on to the next stage of the workbench. I can see the log displaying how many records were deleted off each table as it's showing it as 'DELETE 67' etc whilst running the query. Would it be possible to extract those numbers from the log and use it further in my workbench in e.g. TestFilter to check whether everything in the "delete table" has actually been deleted before moving on to the next stage of the workbench?

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

mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • January 31, 2018

You could try using the LogMessageStreamer - but to be honest I would use a SQLExecutor to query the database and count the number of records directly. I think it would be safer than trying to parse the log window.


bruceharold
Supporter
Forum|alt.badge.img+19
  • Supporter
  • 349 replies
  • January 31, 2018

It is also possible to have a startup script that applies a callback function on the log during translation, you can look for a string for example. Mr Ireland's colleague Dave has an example somewhere here :-)