Is there a way to skip very long queries? #993
-
I'm trying to let the user select a parameter and a place and give them date from the closest station. Some of the combinations lead to very long times to process and often don't yield any data. The following example takes about 3 minutes to figure out, that there is "No data available for the given constraints". Is there a way to stop a query after a given time?
(If I use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Dear @lasinludwig , to stop a request at a certain time you could go with The availability of data is really hard to tell from the start, which is why we added those kinds of tricks where it would iterate through multiple stations to find one that matches the criteria. Alternatively if you don't strongly depend on "original" data you may use our |
Beta Was this translation helpful? Give feedback.
Dear @lasinludwig ,
to stop a request at a certain time you could go with
next(filtered.values.query())
(as you said) and stop if a limit is reached.The availability of data is really hard to tell from the start, which is why we added those kinds of tricks where it would iterate through multiple stations to find one that matches the criteria. Alternatively if you don't strongly depend on "original" data you may use our
interpolate
orsummarize
method which puts together data of different stations by either one of the methods. Obviously some parameters are hard to interpolate so the quality of such values is questionable!