Skip to main content
Released

We need a 'Bulk Attribute Type Changer' to change multiple attributes from char

Related products:FME Form
  • December 16, 2015
  • 5 replies
  • 59 views

***Note from Migration:***

Original Title was: We need a 'Bulk Attribute Type Changer' to change multiple attributes from char 200


For example, if you add multiple fields using a Joiner - an automatic writer will add the attributes as Type 'char' and Width '200'. There should be a way to change multiple attributes at once, either from within the writer or with a transformer.

I have been in many situations where I have joined hundreds of integer fields to a road network - and then had to change the Type of each attribute, and each Width and Precision field. this meant around 300 fields had to be manually changed! I also want to stick with the Joiner instead of FeatureMerger - to save time.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • December 17, 2015

Hi @williamedwinall -- turns out you can do this. We made an animated GIF (pasted below) to show you how. I'll grant that it is not easily discoverable but basically if you select a number of attributes and then change types or widths, that change will magically be applied to all that are selected.

(And yes, I would love it if we could preserve data types on fields brought in via Joiner. That is on the roadmap)

'


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • December 17, 2015

Note -- this has been around since at least FME 2015.


Forum|alt.badge.img+4
  • October 5, 2016
@daleatsafe Thanks for this. Would also be really cool if you didn't have to switch to Manual to change data types, and could change the data type before they go to the actual writer.

 

 

That way, you could keep Automatic on at the writer, but it would read in the data types correctly. Is there a way to do this that I don't know of yet?

 


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • October 5, 2016
Depending on the scenario, you can change data types mid-workspace, but you have to be in "dynamic" mode and have that all set up. Check out the tutorial set here: https://knowledge.safe.com/articles/1050/dynamic-workflow-tutorial-introduction.html -- see if your scenario matches one of those and perhaps can be helped. Failing that, chime in here or in the comments on one of those tutorials and we'll continue the discussion.

 

 


arthur_bazin
Contributor
Forum|alt.badge.img+19
  • Contributor
  • November 17, 2020

Hi @daleatsafe,

 

I'm having the same trouble : the need to cast every attributes before entering the writer.

I can't use dynamic mode because I'm writting data into a PostGIS BDD and dynamic feature type only create "lowercased" attributes for the dynamic part... I need uppercase attributes...

 

If you have any tricks (maybe with a python/TCL caller ?), I'm listening ;-)

 

Best regards!