Skip to main content
Question

How to expose FME Feature Attributes with the SQLExecutor?

  • January 27, 2020
  • 5 replies
  • 357 views

Forum|alt.badge.img

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

david_r
Celebrity
  • 8392 replies
  • January 27, 2020

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


oscard
Influencer
Forum|alt.badge.img+22
  • Influencer
  • 344 replies
  • January 27, 2020

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

 

 

Try changing this paramter of the SQLExecutor:


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • January 27, 2020

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

Forum|alt.badge.img
  • Author
  • 21 replies
  • January 28, 2020

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!


Forum|alt.badge.img
  • Author
  • 21 replies
  • January 28, 2020

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!