dataRetrieval icon indicating copy to clipboard operation
dataRetrieval copied to clipboard

user-friendly chunking of service calls?

Open jordansread opened this issue 8 years ago • 6 comments

In order to make it more common for supporting smaller, more manageable queries and then aggregating them on the client side, I wonder if it is within scope to support a few chunking options in WQP calls, such as time or space. An example of this would be:

readWQPdata(statecode="US:MN", siteType="Lake, Reservoir, Impoundment", 
    characteristicName=charName, startDateLo='01-01-1990', startDateHi='12-31-2010', timeChunk='5y')

Not sure about the syntax, but a way to have an individual aggregate call that is too big automatically handled by a chunking feature within dataRet. So this particular example would call readWQPdata 5 times using intervals of 5 years to set startDateHi and startDateLo values, and then bind them and return the full result to the user.

jordansread avatar Mar 03 '16 16:03 jordansread

Would this be better as a blog example?

ldecicco-USGS avatar Mar 03 '16 16:03 ldecicco-USGS

maybe?

jordansread avatar Mar 03 '16 18:03 jordansread

On second thought....you could use the header response to decide if splitting up the calls would make sense. Especially WQP

ldecicco-USGS avatar Mar 03 '16 21:03 ldecicco-USGS

agreed. My thoughts are that you need maybe a bit too much insider knowledge to use the WQP service calls right now. without calls getting out of hand.

jordansread avatar Mar 03 '16 21:03 jordansread

Revisit after POST + sampling activity work to see if still necessary.

ldecicco-USGS avatar Feb 16 '17 19:02 ldecicco-USGS

Ask WQP team if there's an optimal way to do things.

ldecicco-USGS avatar Feb 16 '17 19:02 ldecicco-USGS