-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
One complication here is that a selection does not correspond to a single "filtered set" of data. It corresponds to one or more filter predicate sets. For example, in the case of cross-filtering, each client might use a different filtered data subset. So the first question is to figure out which filtered set you want. You can generate the filter conditions by calling For example: const q = vg.Query.from(datasetName)
.select({ count: vg.count() })
.where($query.predicate()) As for how to execute |
Beta Was this translation helpful? Give feedback.
One complication here is that a selection does not correspond to a single "filtered set" of data. It corresponds to one or more filter predicate sets. For example, in the case of cross-filtering, each client might use a different filtered data subset. So the first question is to figure out which filtered set you want. You can generate the filter conditions by calling
selection.predicate(client)
, which will return a set ofWHERE
clause predicates specific to the provided client. If no client is provided, you should get all filter predicates from all clients registered with that selection. You could then use the result ofselection.predicate()
to filter your query ingetCount()
.For example:
…