-
Hi, vgplot mark Are these limitations accurate? If so can this change - e.g. permitting SQL queries in I tried a few things to transform data after a selection (window functions). I guess my options are to push the transform up (disadvantage is this means transforming unfiltered data: before selection, unless there's something else I'm missing), or else to transform in a custom client, which will be a lot more boilerplate versus vgplot. I guess that I'll be OK with option 1, but interested if I'm missing something and if I'm understanding things correctly. Grateful for any comments! Declan |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Declan, you are correct. Except for the special case where one passes in JS data directly (and in which case selections are not supported), currently vgplot assumes that it is filtering a named table in the database. Many transformations can be precomputed: create a new table as part of your data prep (e.g., as a table defined by a query in a declarative spec, or an As you note, this can break down in some cases where you want a transformation parameterized by a Param or Selection. However, a number of dynamic transformations can be specified using SQL expressions as part of your vgplot spec. Aggregates and binning are obvious examples, and some window functions can also be applied (as in https://idl.uw.edu/mosaic/examples/moving-average.html, which dynamically changes a window frame). However, other more complex transforms, such as aggregation of window function output, are not well supported. If pre-computation or existing expression support don't cover your needs, I'm afraid the options are either (1) write your own custom client or (2) we try to figure out if we can extend vgplot in a principled fashion. Happy to learn about concrete use cases to see if #2 is needed and viable. |
Beta Was this translation helpful? Give feedback.
Hi Declan, you are correct.
Except for the special case where one passes in JS data directly (and in which case selections are not supported), currently vgplot assumes that it is filtering a named table in the database. Many transformations can be precomputed: create a new table as part of your data prep (e.g., as a table defined by a query in a declarative spec, or an
exec
query using standard JS) and then have vgplot query that.As you note, this can break down in some cases where you want a transformation parameterized by a Param or Selection. However, a number of dynamic transformations can be specified using SQL expressions as part of your vgplot spec. Aggregates and binning are obvi…