Skip to main content

Hi,

I've always been struggling to wrap my head around how embedded custom transformers actually stitch into the general workflow. So this might very well be a no-brainer.

If I want a transformer to have two dataflow (two input clauses), one with points/node and another with lines, and want the custom transformer to take certain point/node "names" to transfer to the line features into pre-existing attributes on it, how is this achieved ?

I have "exposed" the three attributes (with seems common across all inputs !?), but I'm unsure whether the assigned values within the custom transformer ever make it out of it.

Please enlighten me of the proper how-to :-)

Cheers

Lars I.

By default, all the attributes on a feature inside a custom transformer are hidden. (Rational is that custom transformers are meant be reused, and the next time might have features with entirely different schemas).

 

 

You can explicitly exposes attributes inside a custom transformer either hardcoded (less robust) or via published parameters (default as of 2015).

 

 

All the actions that take place in the custom transformer occur on the feature directly, exactly as if it were on the main canvas.

 

 

On the transformer output you have a setting Attributes to Output which can be set to All Attributes, or Specified Attributes Only. If Specified is selected all internally created attributes that are not selected are removed from the feature. Note that any exposed attributes originating outside the custom transformer are selected and cannot be unselected.

By default, all the attributes on a feature inside a custom transformer are hidden. (Rational is that custom transformers are meant be reused, and the next time might have features with entirely different schemas).

 

 

You can explicitly exposes attributes inside a custom transformer either hardcoded (less robust) or via published parameters (default as of 2015).

 

 

All the actions that take place in the custom transformer occur on the feature directly, exactly as if it were on the main canvas.

 

 

On the transformer output you have a setting Attributes to Output which can be set to All Attributes, or Specified Attributes Only. If Specified is selected all internally created attributes that are not selected are removed from the feature. Note that any exposed attributes originating outside the custom transformer are selected and cannot be unselected.
Thanks jdh.

 

 

Your explanation is very enlightening :-)

 


By default, all the attributes on a feature inside a custom transformer are hidden. (Rational is that custom transformers are meant be reused, and the next time might have features with entirely different schemas).

 

 

You can explicitly exposes attributes inside a custom transformer either hardcoded (less robust) or via published parameters (default as of 2015).

 

 

All the actions that take place in the custom transformer occur on the feature directly, exactly as if it were on the main canvas.

 

 

On the transformer output you have a setting Attributes to Output which can be set to All Attributes, or Specified Attributes Only. If Specified is selected all internally created attributes that are not selected are removed from the feature. Note that any exposed attributes originating outside the custom transformer are selected and cannot be unselected.
Now I have your attention .... :-)

 

 

How come that the "External Attributes To Expose" are common across all input connectors, and not specific to each ?

 

 

Cheers

 

Lars I.

 

 


Now I have your attention .... :-)

 

 

How come that the "External Attributes To Expose" are common across all input connectors, and not specific to each ?

 

 

Cheers

 

Lars I.

 

 

Hi @lifalin2016, in fact, the "External Attributes To Expose" is a functionality to automatically define published user parameters and internal attributes that will store the values passed through the parameters. Although their names are defined based on the connection when you created the transformer, each parameter can accept any value, so you can use the custom transformer anywhere.

 


Hi @lifalin2016, in fact, the "External Attributes To Expose" is a functionality to automatically define published user parameters and internal attributes that will store the values passed through the parameters. Although their names are defined based on the connection when you created the transformer, each parameter can accept any value, so you can use the custom transformer anywhere.

 

Hi Takashi.

 

 

Yes, I now understand the purpose of the attribute exposing mechanism.

 

 

However,
my question was, why it the parameters aren't specific to each input
connector, but are common to all connectors as a whole.

 

 

I understand that reuse of the transformer needs a fixed set of parameters, but the input connectors are also fixed, so it's a choice as I see it. I'm just asking as to the rationale behind it.

 

 

Cheers

 

 


Hi Takashi.

 

 

Yes, I now understand the purpose of the attribute exposing mechanism.

 

 

However,
my question was, why it the parameters aren't specific to each input
connector, but are common to all connectors as a whole.

 

 

I understand that reuse of the transformer needs a fixed set of parameters, but the input connectors are also fixed, so it's a choice as I see it. I'm just asking as to the rationale behind it.

 

 

Cheers

 

 

That is a very interesting question - and one I hadn't really thought about before. Ironically we've recently had a few support cases with the opposite problem. In a (non-custom) transformer with two input ports and a group-by setting, the group-by setting shows all attributes, when in reality only attributes that appear on both inputs would be usable in a group-by.

 

 

Anyway, back to your question I think the answer is that the custom transformer on the canvas only has a single parameters dialog. If we wanted to make the two input ports different we would need to somehow split that dialog into two, one for each input port, so that you knew which parameter related to the attributes from which port and could only select the attributes from that port.

 

 

I think that's possible - but no-one seems to have had a problem before so it's not something we've had to implement. I can file an enhancement request if you thought it would be useful - or you could post it as an idea on this site and see if anyone else agrees that it would be useful for them.

 


Reply