Skip to main content
Solved

Attribute Exposure in SQL Executer


harish
Contributor
Forum|alt.badge.img+10

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.

Best answer by david_r

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.

View original
Did this help you find an answer to your question?

2 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+39

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.


 


david_r
Celebrity
  • Best Answer
  • February 23, 2024

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.


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