Skip to main content
Question

How to use AttributeJSonPacker and Unpacker

  • September 12, 2017
  • 7 replies
  • 35 views

Forum|alt.badge.img

I need to pack all the attributes of DGN file by using AttributejSonPacker but unable to expose the attribute "_packer" how can i unpacked the same?

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.

7 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • September 12, 2017

Hi @dheeraj,

The custom transformer AttributeJsonPacker is prepared to receive a Json struture:

Have you tried to expose the Format Attributes from your DGN?

Thanks,

Danilo


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • September 12, 2017

Hi @dheeraj,

You can expose the "_packer" attribute using the AttributeExposer transformer. I will take another look at that transformer to see if we can have it automatically expose that attribute.


Forum|alt.badge.img
  • Author
  • 45 replies
  • September 13, 2017

Hi @dheeraj,

The custom transformer AttributeJsonPacker is prepared to receive a Json struture:

Have you tried to expose the Format Attributes from your DGN?

Thanks,

Danilo

Yes, I have tried to expose attribute by AttributeExposer Transformer as well but i am unable to see "_packed" attribute in list...

 

If the attribute is not visible to me then how can i unpack it again?

 

 

 


Forum|alt.badge.img
  • Author
  • 45 replies
  • September 13, 2017

Hi @dheeraj,

You can expose the "_packer" attribute using the AttributeExposer transformer. I will take another look at that transformer to see if we can have it automatically expose that attribute.

I have tried with attribute Exposer but unable to get attribute in list

 

 


takashi
Celebrity
  • 7843 replies
  • September 13, 2017

Hi @dheeraj, the AttributeJSONUnpacker has the parameter "Attributes to Expose", so you can expose required attribute names via the parameter. Of course the AttributeExposer can also be used in the subsequent workflow alternatively.

Note that FME Workbench doesn't list automatically the attribute names that will be unpacked with the transformer. You will have to enter their names manually, if necessary.


Forum|alt.badge.img
  • Author
  • 45 replies
  • September 20, 2017

Hi @dheeraj, the AttributeJSONUnpacker has the parameter "Attributes to Expose", so you can expose required attribute names via the parameter. Of course the AttributeExposer can also be used in the subsequent workflow alternatively.

Note that FME Workbench doesn't list automatically the attribute names that will be unpacked with the transformer. You will have to enter their names manually, if necessary.

Hi, In this case i am unable to use attr1, attr2, attr3 ? either by using attribute exposer,

 

 

I just can view $_NEW_Attributes.

takashi
Celebrity
  • 7843 replies
  • September 20, 2017

Hi @dheeraj, the AttributeJSONUnpacker has the parameter "Attributes to Expose", so you can expose required attribute names via the parameter. Of course the AttributeExposer can also be used in the subsequent workflow alternatively.

Note that FME Workbench doesn't list automatically the attribute names that will be unpacked with the transformer. You will have to enter their names manually, if necessary.

What version (build number) of FME are you using? Possibly FME with some specific build numbers has an issue on exposing new attribute names created within a custom transformer. If the Attributes to Expose parameter in the AttributeJSONUnpacker doesn't work fine, leave the parameter empty and try using the AttributeExposer instead.