Skip to main content
Question

How to expose FME Feature Attributes with the SQLExecutor?

  • January 27, 2020
  • 5 replies
  • 233 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.

5 replies

david_r
Evangelist
  • 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+21
  • Influencer
  • 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+31
  • Influencer
  • 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
  • January 28, 2020
ebygomm wrote:

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
  • January 28, 2020
oscard wrote:

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


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