I am using SQL Executer but in the output port I am not getting the attribute exposed automatically. My SQL expression I am only counting the inputs so I cannot expose the attribute using “Populate Attribute from SQL”. I cannot use Attribute exposer every time I am using the SQL. Is there any other way to do this.
Page 1 / 1
For me doing a count(*) works in PostGIS - I get ‘count’ exposed in FME 2023 (when using the Populate from SQL Query function).
FME will make the call in order to figure out what needs to be exposed. If you have attribute values in the call then the query wont work. The call in the SQL Query to Populate Attributes window should be valid.
Depending on the database it might be a good idea to set a column alias when using functions, e.g.
select count(*) as "MY_COUNT"
from my_schema.my_table
where my_criteria
In this case you should expose MY_COUNT in the SQLExecutor.