Skip to main content

I built a dynamic workflow to change a attribute for CSV file. It turns out that the attribute name is changed but without value in the output CSV file. Please could you help solve the issue?

The input CSV file and workbench has been attached with the post.

With dynamic writing and using the feature reader/writer workflow transformers, you need to connect the schema reader output port into the feature writer AND you need the data going into the feature writer also.

but your workspace needs to remove the sampler and other. transformers. Not exactly understanding what you want to achieve here

NOTE. the schema feature needs to arrive first (add a feature holder to the data stream if required) 

 


I am following this tutorial.

What I try to do is to dynamically change Attribute names.In the table below, the first attribute is Road Name. But at the end, I want to change it to Road name. 

Road Name Section Id
ABC St 1
EFG Rd 1

 

to 

Road name Section Id
ABC St 1
EFG Rd 1

 

The attribute name to be changed is not fixed otherwise AttributeRenamer can handle that. That’s why I am trying with the dynamic workflow and hope it can provide me with the functionality to change the required attribute on the fly. The example workbench just my first step towards the goal.

The problem I am facing is that the attribute name is changed but the values are gone as shown below.

Road name Section Id
  1
  1

 

 


If you’re not renaming attributes then you can use the schema feature from the FeatureReader as suggested by ​@j.botterill . However if you are changing the input schema in any way then you will need to make sure that you also update the schema feature as well.

What you really want to do here is Reader > Rename Attribute > SchemaScanner > Output.

I think you might find it difficult thought to rename attributes dynamically, it’s do able but it’s more difficult than it should be.

 


Thank you ​@j.botterill and ​@virtualcitymatt.

 

I solved my problem with transformer SchemaMapper.