Skip to main content

I only need a certain dateTime values from a json source (a tide gauge) to get the water level associated with a coastal Sentinel-2 scene. I can get the water level for a particular time from the json data as it is the same list value (the satellite always comes around the same time) but the only way to set the date seems to be in the source url

http://environment.data.gov.uk/flood-monitoring/id/stations/E71739/readings.json?date=2020-04-15

The date I can get from the filename of the downloaded Sentinel tiff file but there seems to be no way to pass the date into the reader URL string.

Any simple ways to do this would be great :-)

Hi @udo,

I would take a look at the FeatureReader transformer instead of the Reader itself.

Create an attribute from your tiff file that stores the date (perhaps using the FilenamePartExtractor if the filename is the date) then in the FeatureReader you can set the Dataset Source URL to use that attribute, e.g. http://environment.data.gov.uk/flood-monitoring/id/stations/E71739/readings.json?date=@Value(date)


Hi @udo,

I would take a look at the FeatureReader transformer instead of the Reader itself.

Create an attribute from your tiff file that stores the date (perhaps using the FilenamePartExtractor if the filename is the date) then in the FeatureReader you can set the Dataset Source URL to use that attribute, e.g. http://environment.data.gov.uk/flood-monitoring/id/stations/E71739/readings.json?date=@Value(date)

Thanks Holly, that did the trick!!

As a general comment having used FME for about 5 years on a casual basis, I find it still bewildering that there are quite different ways to do things and that the obvious one (ie a Jason reader) can't do what another reader/transformer can do - and there is no obvious hint saying e.g. that when one selects one tool (e.g. the jason reader) that there is not a pop-up or something that suggests alternatives (or like on some websites, if i have laboured for 5 minutes on something like the Jason reader, opened it and changed things and run it, it comes up with a friendly suggestion like 'I see you are trying to read some json data, you could try xyz.').

Just a suggestion to make it easier for the occasional user - though with the kind of support and speed in the community this might be overkill :-)


Thanks Holly, that did the trick!!

As a general comment having used FME for about 5 years on a casual basis, I find it still bewildering that there are quite different ways to do things and that the obvious one (ie a Jason reader) can't do what another reader/transformer can do - and there is no obvious hint saying e.g. that when one selects one tool (e.g. the jason reader) that there is not a pop-up or something that suggests alternatives (or like on some websites, if i have laboured for 5 minutes on something like the Jason reader, opened it and changed things and run it, it comes up with a friendly suggestion like 'I see you are trying to read some json data, you could try xyz.').

Just a suggestion to make it easier for the occasional user - though with the kind of support and speed in the community this might be overkill :-)

Hi @udo,

Brilliant, I'm pleased to hear you were able to get that working.

 

 

Thank you for the feedback, I agree it can certainly be overwhelming when you are just getting started as there are often a number of ways to achieve a similar thing. I've passed your comments on to our Desktop Authoring Product Owner who has made note of this post and your suggestion.

 


Reply