Skip to main content
Solved

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


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?

Best answer by ebygomm

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

View original
Did this help you find an answer to your question?

6 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • March 25, 2021

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


  • Author
  • March 25, 2021

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


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • March 25, 2021
dandgetz wrote:

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


Forum|alt.badge.img+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


  • Author
  • March 25, 2021
ebygomm wrote:

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!


  • Author
  • March 25, 2021
markatsafe wrote:

@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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings