Date range must be specified if the selector has conditions or ordering
for a stat field. Note that only the last date range specified for the
selector will take effect.
Sets a custom date range onto the selector. Both parameters can be either
an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD form. For instance, March 24th, 2013 is
represented as either {year: 2013, month: 3, day: 24} or
"20130324". The date range is inclusive on both ends, so
forDateRange("20130324", "20130324") sets the range of one
day.
Date range must be specified if the selector has conditions or ordering
for a stat field. Note that only the last date range specified for the
selector will take effect.
The results will be ordered by metrics.clicks in descending order.
Results with equal metrics.clicks value will be ordered by metrics.ctr in
ascending order.
All specified conditions are AND-ed together. The above
example will retrieve entities that observed over 100 metrics.impressions
AND more than 5 clicks.
The parameter to be passed into this method must be of the following
form:
"COLUMN_NAME OPERATOR VALUE"
Operators
The operator that can be used in a condition depends on the type of column.
For Integer and Long columns (e.g.
metrics.clicks and metrics.impressions):
< <= > >= = !=
For Double columns (e.g. metrics.ctr):
< >
For String columns (e.g. campaign.name):
= != (NOT) (LIKE | CONTAINS | REGEXP_MATCH)
For Enumeration columns (ones that can only take one
value from a predefined list, such as Status):
= != IN () NOT IN ()
For StringSet columns (e.g. campaign.labels):
CONTAINS ALL () CONTAINS ANY () CONTAINS NONE ()
Conditions using IN, NOT IN, CONTAINS
ALL, CONTAINS ANY and CONTAINS NONE
operators look as follows:
withCondition("resource.column_name IN (Value1, Value2)")
Columns
All column names are case-sensitive, and so are all values of enumerated
columns (such as Status).
The resulting selector can be further refined by applying additional
conditions to it. The ID-based condition will then be AND-ed together with
all the other conditions, including any other ID-based conditions. So, for
instance, the following selector:
The resulting selector can be further refined by applying additional
conditions to it. The resource name condition will then be AND-ed together
with all the other conditions.
The selector can only support up to 10,000 resource names. If more than
10,000 resource names are specified, the corresponding get() call will fail
with a runtime error.
[null,null,["Last updated 2025-03-03 UTC."],[[["Fetches price extensions for filtering and sorting."],["Allows filtering by price IDs, asset attributes, and applying date ranges."],["Supports ordering results by specified criteria."],["Provides methods for limiting the number of results returned."],["Can fetch either legacy or upgraded price extensions."]]],[]]