Timevector Pipeline API Discussion #10
Replies: 7 comments 6 replies
-
Note that we don't necessarily need to stick to just one of these; from my experiments it looks like multiple of these options can happily coexist, and I expect that we'd likely want to have the Regular Function Calls syntax in addition to the a pipeline one. Still, I think it's worth determining which of these is easiest to learn and use. |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if the examples become a bit more stark as you introduce arguments to functions in the pipeline, ie suppose interpolate took some arguments, say 'linear' or 'spline' it seems like the regular function call approach becomes much more difficult to read in that case. |
Beta Was this translation helpful? Give feedback.
-
Another dimension to this is what the textual format of the
though there are many other options. |
Beta Was this translation helpful? Give feedback.
-
Looking at the options here, I think I'd cast my vote for the internal pipeline as the cost of materialization might be a bit too high with the other approaches. The extra parens in the external pipeline seem a little unnatural too me, and the fact that it may perform poorly without them is terrible in my mind (if we can detect this case and print an error that would mitigate this case a lot). Can you explain a bit more what the issue terminal aggregations in the third case are, and why we can't easily work around this? |
Beta Was this translation helpful? Give feedback.
-
Just wanted to flag up use of pipeline (pipe operator) in R, esp in Tidyverse. I am not a PostgreSQL expert and I am aware of %wildcard syntax, so just highlighting maybe some learning from R Tidyverse community (not all like the excessive use of the Pipe operator and some comparisons show it is slower than nested function calls, though these are harder for most to read). |
Beta Was this translation helpful? Give feedback.
-
I may be missing a clear implication here but I’m curious: How will this syntax handle a table with multiple dimension options? E.g.,
How do you look at pulse_count by country_code versus by version or by device_id? Also what will it do if pulse_count is a (possibly resetting) counter rather than a value per time interval? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure this is a valid use case for what you folks consider a pipeline api, but I wonder if and how I'd merge multiple data streams using the considered pipeline api. Right now it looks like it's just going to simplify function nesting but not being a general use case pipeline calculation api. An example from our system, that right now is implemented as an external api with raw data from timescale being streamed in, in pseudo code:
I guess in the pipeline api, as shown above, it'd be something like that?
What I mean, in the end, I guess, standard operations like filtering and stuff would require multiple nested selects, wouldn't it? I hope the example itself makes sense :D |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note: we started this discussion back when we were calling these
timeseries
rather thantimevector
s so there may be some references to that throughout.In issue #2 we describe and API to work on "timeseries", ordered-sets of
(time, value)
pairs, for things like gapfilling, interpolation, and extrapolation. Conceptually, such an API has two components:One open question we have is what the API for the transformation pipeline should look like. Right now we've thought of three leading candidates with various tradeoffs between them:
Below I'll discuss various pros and cons to each approach.
Regular Function Calls
pros:
cons:
External Pipeline
pros:
cons:
()
, or the less efficient variant a to also be enabled.Internal Pipeline
pros:
cons: all the cons of the External Pipeline plus
avg()
may require a different convention.Beta Was this translation helpful? Give feedback.
All reactions