Solved

What would cause the Attribute Exposer not to return attributes from a JSON Flattener?

  • 25 March 2021
  • 6 replies
  • 14 views

I am trying to follow the documentation listed here https://community.safe.com/s/article/json-transformations about making an HTTP call, flattening the JSON with JSONFlattener, and then pulling out the attributes with AttributeExposer.

 

The flattener even seems to show the flattened JSON feature information. But when I connect that to the attribute exposer, it seems like I can't choose anything out of the JSONFlattener as my attribute to expose in the attribute exposer. Importing isn't any better. It doesn't automatically find the features for me, and the import options seem to be only documents or URLs.

 

A URL pointing at the API would work for this example, but not if I wanted to use an API with more stringent access policy.

 

Am I missing a transformer or a JSON query in between the flattener and the Attribute Exposer? Is there a better workaround here?

icon

Best answer by ebygomm 25 March 2021, 15:34

View original

6 replies

Userlevel 1
Badge +21

You need to type the attributes to expose in the AttributeExposer, they won't come up as options to choose

Thanks. I was hoping it was automatic in some way but I can manually choose it. This would be a good enhancement request.

Userlevel 1
Badge +21

Thanks. I was hoping it was automatic in some way but I can manually choose it. This would be a good enhancement request.

If you are on 2020 or above, i think you can choose to import from FeatureCache (bottom right of the attribute exposer) instead of having to type

Badge +2

@dandgetz​ We have a webinar on how to get the best out of Feature Caching on Wednesday 31st March 2021: Workspace Authoring 101: Feature Caching

To expand on @ebygomm​ 's comment on importing the attribute names.:

For FME 2020+ , provided your feature cache is current for the previous transformer (FeatureReader in the image below), you can use AttributeExposer to import the list of attributes you want to expose in workbench.

image

If you are on 2020 or above, i think you can choose to import from FeatureCache (bottom right of the attribute exposer) instead of having to type

Ha! There's my problem. I am on 2019! It's a version problem. I have been driving myself crazy and this was the reason. I will upgrade it soon. Thank you so much!

@dandgetz​ We have a webinar on how to get the best out of Feature Caching on Wednesday 31st March 2021: Workspace Authoring 101: Feature Caching

To expand on @ebygomm​ 's comment on importing the attribute names.:

For FME 2020+ , provided your feature cache is current for the previous transformer (FeatureReader in the image below), you can use AttributeExposer to import the list of attributes you want to expose in workbench.

image

Thank you so much. I will watch that today after I get my version upgraded. This will save me so much time.

Reply