Skip to main content

Hi all.

 

I'm reading five feature types from Oracle using a Feature Reader and I want to suffix each of the attributes in each feature type with a text string.

 

The reason for this is that I'm running some line on line and line on area transformers and the attributes from each feature type have identical names.

 

The end goal is to generate a dynamic schema (with renamed attributes) on the output tables based on merged feature types from the transformers mentioned above.

 

Is the bulk attribute remover the correct transformer to be using here?

 

Thanks,

Michael

 

What have I missed?

Hello @Michael Drover​ , this is a bit difficult to conceptualize from reading. I think you're looking for the BulkAttributeRenamer instead of the BulkAttributeRemover? This transformer has the ability to add prefixes or suffixes to attribute names (Action: Add String Prefix, Mode: Rename, String: “FR_”). If I misunderstood your ask, please let me know and reiterate! Here to help, Kailin.


Hi @kailinatsafe​ 

 

Yes, your are correct. It is the BulkAttrbuteRenamer that I meant. I'll please guilty but I wrote at the end of the day.

 

I have tried however my issues is I need to prefix each of the attributes within the five feature types with a different suffix.

 

I have five features as below

  • Pipelines
  • Ordered Drainage
  • Hydrology
  • Railways
  • Roads

The LineOnLineOverlayer is creating results from Pipeline/Road, Pipeline/Hydrology, Pipeline/Ordered Drainage, Pipeline/Railways and Pipeline/Roads. Each of these results are being place into shp, tab and xlsx formats.

 

In each of the tables, many of the attribute share a common name which is why I want to place a prefix before each to identify it in the resulting output ie PIPE_NAME & ROADS_NAME.

 

Can I use the BulkAttrbuteRenamer on the FeatureReader <SCHEMA> or do I need to apply it to each of the Feature types?

 

Thanks,

Michael


Hi @kailinatsafe​ 

 

Yes, your are correct. It is the BulkAttrbuteRenamer that I meant. I'll please guilty but I wrote at the end of the day.

 

I have tried however my issues is I need to prefix each of the attributes within the five feature types with a different suffix.

 

I have five features as below

  • Pipelines
  • Ordered Drainage
  • Hydrology
  • Railways
  • Roads

The LineOnLineOverlayer is creating results from Pipeline/Road, Pipeline/Hydrology, Pipeline/Ordered Drainage, Pipeline/Railways and Pipeline/Roads. Each of these results are being place into shp, tab and xlsx formats.

 

In each of the tables, many of the attribute share a common name which is why I want to place a prefix before each to identify it in the resulting output ie PIPE_NAME & ROADS_NAME.

 

Can I use the BulkAttrbuteRenamer on the FeatureReader <SCHEMA> or do I need to apply it to each of the Feature types?

 

Thanks,

Michael

Hello @Michael Drover​ , thanks for responding! I decided to try this myself. I think you're better off sending each feature type through the BulkAttributeRenamer, unless you're dynamically writing. The schema port is generally used for dynamic purposes (Writers > "Dynamic Schema Definition"). 

 

If you're using Automatic/Manual feature type definitions (in your writer), connect the Feature Types directly to the BulkAttributeRenamer.

 

If you're using Dynamic, I would explode the attribute list (Visual Preview Window > Feature Information) attached to your schema feature firstly, and then use BulkAttributeRenamer.

 

BulkAttrRename 

Just incase you're interested in exploring dynamic workspaces:

 

 

Let me know if you have further questions. Best, Kailin.


Reply