Skip to main content
Question

How to create a loop that goes through multiple schemas?

  • August 22, 2024
  • 1 reply
  • 58 views

rosh
Contributor
Forum|alt.badge.img+1
  • Contributor

Hello everyone, I need to create a loop in FME 2021, this loop would allow me to be able to browse several tables of several schemas of my database to retrieve a specific column "last_update" and then sort this column to retrieve the "last update date". So I would like to retrieve the "last update date" of all my tables but I don't know how to create a loop in FME 2021! Thank you for your help!

1 reply

hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • August 22, 2024

You don’t need to loop to do this. At a high level you could:

  • have the tables you want to check as a comma separated string
  • pass that through to an attributesplitter then explode the resulting list using a list exploder. This will give you one feature per table to check
  • Pass all these features into an SQLExecutor and specify the table to read as your attribute with the table name
  • Set the SQL statement to return one row with the most recent last edited date

The output of the SQLExecutor will be one feature per input with the table name and the most recent last edited date

 


Reply


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