Skip to main content
Solved

How to expose/use attachments from json

  • March 23, 2020
  • 2 replies
  • 97 views

Hi

I have a workbench looking at a json feed: https://niord.dma.dk/rest/public/v1/messages?lang=dk&domain=niord-nm

The feed contains attachments for some of the features, with a column specifying a link to the location of the attachment (PNG file typically):

I would like to populate a field with this url, so that I can sent it to correxponding features in a SDE database. i tried to use AttributeExposer and AttributeCreator to extract the link to a new coloumn, but this seems impossible as the coloumns with the attachment information is not available in the list of attributes to expose/create (should be between areas and charts):

How can I extract the information from attachments coloumns to an attribute in FME then?

Here is an example of one of the attachment files:

https://niord.dma.dk/rest/repo/file/messages/e/f0/ef03d235-70af-44e9-8a20-8c506534abfe/80/Overview%20with%20national%20measures_5.png

Best answer by ebygomm

If you wanted to expose attachments{0}.path you just type it in the AttributeExposer, it won't appear in the drop down. This is a list item though, so if you want to get all the values you will need to explode the list or similar.

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.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • March 23, 2020

If you wanted to expose attachments{0}.path you just type it in the AttributeExposer, it won't appear in the drop down. This is a list item though, so if you want to get all the values you will need to explode the list or similar.


daraghatsafe
Forum|alt.badge.img
  • 135 replies
  • March 26, 2020

Hi @kristianbj were you able to use the AttributeExposer to achieve your goal?