Skip to main content

Hello,

I am struggling with what I am sure is a very simple thing but one that I cannot sort out.

 

I am using Path to search for specific files in a directory which I then read with the Feature Reader. Thing is, I need part of the path_rootname as an attribute to use forward but I cannot seem to be able and extract it. I created "Year" as per the snips but I don't know how to use it forward. I only get the values from the Generic port but for "Year" I get <missing> for each row.

 

I can see the "Year" attribute in the <Schema> port (and it shows up correctly) but I do not know how to pass it on to the next transformers. I tried connecting the <schema> port along with the <generic> one but it doesn't work.

 

I also tried attribute exposer, attribute creator but no luck. Any ideas on why this isn't working? thank you!

At the bottom of the FeatureReader fold out "Attribute and Geometry Handling" and choose "Merge Initiator and Result".


At the bottom of the FeatureReader fold out "Attribute and Geometry Handling" and choose "Merge Initiator and Result".

thank you, @nielsgerrits​, that did the job.

I am now trying to understand the logic behind. I initially had "Only use result". I have to read what the difference is. Thank you again,


thank you, @nielsgerrits​, that did the job.

I am now trying to understand the logic behind. I initially had "Only use result". I have to read what the difference is. Thank you again,

From the documentation:

Merge Initiator and Result: Output features will contain all of the un-conflicted attributes from the results of the read as well as any un-conflicted attributes from the Initiator feature. This mode will handle conflicted attributes based on the Conflict Resolution parameter.

Only Use Result: Output features will contain only attributes resulting from the read.

Only Use Initiator: Output features will contain all of the attributes from the Initiator feature, but none of the attributes resulting from the read.

Prefix Initiator: Output features will contain attributes resulting from the read, as well as attributes from the Initiator feature but with the Initiator attribute names prefixed with the Prefix parameter.


Reply