Question

How to expose FME Feature Attributes with the SQLExecutor?

  • 27 January 2020
  • 5 replies
  • 46 views

Badge

Hello,

 

I'm having troubles with exposing FME Feature Attributes with the SQLExecutor.

I use the SQL Executor with this statement:

And therefore I entered these attributes to be exposed:

 

I would like to add the FME Feature Attribute ‘SAMPLE_NR’.

- How do I need to add the attribute to the SQL statement?

- And what should I put as ‘Attribute to Expose’?

 

I tried this:

With the term SAMPLE_NR or '' or as Attribute to Expose. But each time I get the value <missing> in the SAMPLE_NR column.

 

 

Thanks in advance for any help.


5 replies

Userlevel 5

Basically you cannot expose a dynamic attribute since they're not known until the workspace is executed.

You will find a lot of posts on this subject here in the forums.

For solutions, look up dynamic schema, this is a great starting point: https://knowledge.safe.com/articles/1050/dynamic-workflow-tutorial-introduction.html

Userlevel 2
Badge +19

If I understand your problem, you need to add the Initiator attributes to the Result attributes.

 

 

Try changing this paramter of the SQLExecutor:

Userlevel 1
Badge +21

Have you tried altering the SQL to, presuming you just want the value used in the query to be populated in an attribute called SAMPLE_NR

'@Value(SAMPLE_NR)' as SAMPLE_NR
Badge

Have you tried altering the SQL to, presuming you just want the value used in the query to be populated in an attribute called SAMPLE_NR

'@Value(SAMPLE_NR)' as SAMPLE_NR

This indeed does the job, thank you!

Badge

If I understand your problem, you need to add the Initiator attributes to the Result attributes.

 

 

Try changing this paramter of the SQLExecutor:

This also works if one wants all the FME Feature Attributes to be exposed by the SQLExecutor (instead of only one of them).

 

I wasn't aware of the use of this parameter, thank you!

Reply