Skip to main content

Recently I put different tables into a PostGIS database. One of these tables contains 23M unique records and does not contain spatial data. I would like to read them into a FME workbench. Do you have some suggestions how I could improve my reading process?

  1. Is it possible for example to preselect already a set of columns I need while reading my table using 'SQL to Run before Read'?’ If so do you have a example SQL querry?
     
  2. Is there a performance difference between  'SQL to Run before Read'?’ and the WHERE clause option in the Constraints menu?

 

I wouldn’t worry about using the ‘SQL to Run Before Read’ functionality.

I think your best approach would be to use the SQLExecutor. You can form a complete SQL statement in there, with joins, subqueries etc and also specify your fields you want to read in.

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/sqlexecutor.htm


@hkingsbury thanks, works perfect!

Do you of someone else know the SQL querry to use my initiator of the SQL executor as SpatialFilter on the imported table? Like you do in a FeatureReader with Initiator OGC- Interesects Result ?

A reference file or guide is also fine to me

Update: I found this interesting article:
|Performing Native Spatial Queries on Database Tables Using the SQLExecutor – FME Support Center (safe.com)
I will dive into that one


Reply