Skip to main content

Hi All,

I have a point feature service on AGOL which gets populated daily with new points, data and attachments.

I'm trying to make a WHERE clause for an AGOL reader so FME only reads data from the last 3 days. According to ArcGIS dev page https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm , the WHERE clause should look like this EditDate > CURRENT_TIMESTAMP - INTERVAL '03' DAY

 

.

However, FME gives me a fatal error.

Simple queries like EditDate > '2020-03-05 00:00:00.000' work just fine.

EditDate is esriFieldTypeDate and it comes into FME as '20200305235154.156000'

 

P.S. the script will be published to FME Server (Cloud), so the solution should work for the Server too.

 

Please help!

 

I'm not familiar with how the query should be structured, but as an alternative you could swap the reader for a featurereader and ahead of this calculate the date 3 days ago to use in a simple where clause


I'm not familiar with how the query should be structured, but as an alternative you could swap the reader for a featurereader and ahead of this calculate the date 3 days ago to use in a simple where clause

I agree with @ebygomm I do this, figure out an expression for the where clause, works well.


I'm not familiar with how the query should be structured, but as an alternative you could swap the reader for a featurereader and ahead of this calculate the date 3 days ago to use in a simple where clause

Thank you guys! This approach works fine for querying data from 3 last days; however, I struggle to find a way to read attachments from AGOL feature service using FeatureReader. Is there a way?

 

P.S. With a generic reader, I used AttributeExposer -> ListExploder to retrieve attachments. These 2 transformers don't do any good for the FeatureReader.


@bruceharold @ebygomm

Just found a solution! WHERE Clause should look like

EditDate > DateAdd(day,-3,getdate())

 

Yay!

 


Thank you guys! This approach works fine for querying data from 3 last days; however, I struggle to find a way to read attachments from AGOL feature service using FeatureReader. Is there a way?

 

P.S. With a generic reader, I used AttributeExposer -> ListExploder to retrieve attachments. These 2 transformers don't do any good for the FeatureReader.

Don't know if you have solved this yet... but I was stumped on this too!

Screenshot 2021-01-12 154438Attribute File Writer Properties:

Screenshot 2021-01-12 154504Feature Reader Properties:

Screenshot 2021-01-12 154524


Reply