2

I'm importing data from a file geodatabase (*.gdb) to a PostGIS database using FME Desktop 2016. For this I need first to rename single attribute names using the AttributeRenamer transformer. My problem is that, reader attributes with width 254 (data type "text") are automatically transformed to writer width 200 (type "varchar"). Why does FME cut the width of the attributes, is it a bug?

However, this issue only appears when I use an AttribruteRenamer. I also tried the BulkAttributeRenamer, which retrieves the same.

Any ideas?

1
  • I there any solution to the change to default datatype when using BulkAttributeRenamer? Except doing it manually.
    – Anton
    Commented Feb 28, 2019 at 16:30

1 Answer 1

1

I think you're probably using the writer with an Automatic schema:

enter image description here

So anything that connects to the writer gets an attribute. However, unless it came from the original schema, FME doesn't know what data type it should be.

In my screenshot (above) Name got renamed to parkname (and ID to parkid). Because of the automatic mode, parkname gets a definition on the writer; but because there is no such attribute on the source schema FME doesn't know what data type it should be. It defaults to varchar200.

Ideally we (I work for Safe Software) would improve FME's behaviour. It certainly ought to notice that parkname is just a rename of a source attribute. But in the meantime you could turn off the automatic attribute definitions; either turn it to manual completely or turn it to manual before running the workspace and edit the field widths manually at that point.

1
  • Also when adding the writer, he could select 'Copy From Reader' in the drop down on the Add Writer dialog, which should define the Feature Type schema definition as the same as the Reader.
    – nr_aus
    Commented Mar 26, 2021 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.