public interface DataApiRequest extends ApiRequest
Modifier and Type | Field and Description |
---|---|
static String |
DATE_TIME_STRING |
static String |
RATIO_METRIC_CATEGORY |
static String |
REQUEST_MAPPER_NAMESPACE |
ASYNCHRONOUS_ASYNC_AFTER_VALUE, SYNCHRONOUS_ASYNC_AFTER_VALUE
Modifier and Type | Method and Description |
---|---|
Map<Dimension,Set<ApiFilter>> |
generateFilters(String filterQuery,
LogicalTable table,
DimensionDictionary dimensionDictionary)
Generates filter objects on the based on the filter query in the api request.
|
ApiFilters |
getApiFilters()
The filters for this ApiRequest, grouped by dimensions.
|
OptionalInt |
getCount()
An optional limit of records returned.
|
Optional<OrderByColumn> |
getDateTimeSort()
An optional sorting predicate for the time column.
|
LinkedHashMap<Dimension,LinkedHashSet<DimensionField>> |
getDimensionFields()
A map of dimension fields specified for the output schema.
|
Set<Dimension> |
getDimensions()
The set of grouping dimensions on this ApiRequest.
|
Filter |
getDruidFilter()
Builds and returns the Druid filters from this request's
ApiFilter s. |
DruidFilterBuilder |
getFilterBuilder()
A filter builder (remove).
|
Set<Dimension> |
getFilterDimensions()
Get the dimensions used in filters on this request.
|
Granularity |
getGranularity()
The grain to group the results of this request.
|
Having |
getHaving()
The fact model having (should probably remove this).
|
Map<LogicalMetric,Set<ApiHaving>> |
getHavings()
The having constraints for this request, grouped by logical metrics.
|
Set<org.joda.time.Interval> |
getIntervals()
The intervals for this query.
|
Set<LogicalMetric> |
getLogicalMetrics()
The logical metrics requested in this query.
|
LinkedHashSet<OrderByColumn> |
getSorts()
A prioritized list of sort columns.
|
LogicalTable |
getTable()
The logical table for this request.
|
org.joda.time.DateTimeZone |
getTimeZone()
The date time zone to apply to the dateTime parameter and to express the response and granularity in.
|
OptionalInt |
getTopN()
The limit per time bucket for a top n query.
|
DataApiRequestImpl |
withAsyncAfter(long asyncAfter) |
DataApiRequestImpl |
withBuilder(javax.ws.rs.core.Response.ResponseBuilder builder) |
DataApiRequestImpl |
withCount(int count) |
DataApiRequestImpl |
withDimensions(Set<Dimension> dimensions) |
DataApiRequestImpl |
withFilterBuilder(DruidFilterBuilder filterBuilder) |
DataApiRequestImpl |
withFilters(ApiFilters filters) |
DataApiRequestImpl |
withFormat(ResponseFormatType format) |
DataApiRequestImpl |
withGranularity(Granularity granularity) |
DataApiRequestImpl |
withHaving(Having having) |
DataApiRequestImpl |
withHavings(Map<LogicalMetric,Set<ApiHaving>> havings) |
DataApiRequestImpl |
withIntervals(Set<org.joda.time.Interval> intervals) |
DataApiRequestImpl |
withLogicalMetrics(Set<LogicalMetric> logicalMetrics) |
DataApiRequestImpl |
withPaginationParameters(Optional<PaginationParameters> paginationParameters) |
DataApiRequestImpl |
withPerDimensionFields(LinkedHashMap<Dimension,LinkedHashSet<DimensionField>> perDimensionFields) |
DataApiRequestImpl |
withSorts(LinkedHashSet<OrderByColumn> sorts) |
DataApiRequestImpl |
withTable(LogicalTable table) |
DataApiRequestImpl |
withTimeZone(org.joda.time.DateTimeZone timeZone) |
DataApiRequestImpl |
withTopN(int topN) |
DataApiRequestImpl |
withUriInfo(javax.ws.rs.core.UriInfo uriInfo) |
generateDateTimeFormatter, getAsyncAfter, getBuilder, getDefaultPagination, getFormat, getPage, getPage, getPagination, getPaginationParameters, getUriInfo
static final String REQUEST_MAPPER_NAMESPACE
static final String RATIO_METRIC_CATEGORY
static final String DATE_TIME_STRING
Filter getDruidFilter()
ApiFilter
s.
The Druid filters are built (an expensive operation) every time this method is called. Use it judiciously.
Map<LogicalMetric,Set<ApiHaving>> getHavings()
Having getHaving()
LinkedHashSet<OrderByColumn> getSorts()
OptionalInt getCount()
OptionalInt getTopN()
org.joda.time.DateTimeZone getTimeZone()
DruidFilterBuilder getFilterBuilder()
Optional<OrderByColumn> getDateTimeSort()
Set<Dimension> getFilterDimensions()
LogicalTable getTable()
Granularity getGranularity()
Set<Dimension> getDimensions()
LinkedHashMap<Dimension,LinkedHashSet<DimensionField>> getDimensionFields()
Set<LogicalMetric> getLogicalMetrics()
Set<org.joda.time.Interval> getIntervals()
ApiFilters getApiFilters()
Map<Dimension,Set<ApiFilter>> generateFilters(String filterQuery, LogicalTable table, DimensionDictionary dimensionDictionary)
filterQuery
- Expects a URL filter query String in the format:
(dimension name).(fieldname)-(operation):[?(value or comma separated values)]?table
- The logical table for the data requestdimensionDictionary
- DimensionDictionaryDataApiRequestImpl withFormat(ResponseFormatType format)
DataApiRequestImpl withPaginationParameters(Optional<PaginationParameters> paginationParameters)
DataApiRequestImpl withUriInfo(javax.ws.rs.core.UriInfo uriInfo)
DataApiRequestImpl withBuilder(javax.ws.rs.core.Response.ResponseBuilder builder)
DataApiRequestImpl withTable(LogicalTable table)
DataApiRequestImpl withGranularity(Granularity granularity)
DataApiRequestImpl withDimensions(Set<Dimension> dimensions)
DataApiRequestImpl withPerDimensionFields(LinkedHashMap<Dimension,LinkedHashSet<DimensionField>> perDimensionFields)
DataApiRequestImpl withLogicalMetrics(Set<LogicalMetric> logicalMetrics)
DataApiRequestImpl withIntervals(Set<org.joda.time.Interval> intervals)
DataApiRequestImpl withFilters(ApiFilters filters)
DataApiRequestImpl withHavings(Map<LogicalMetric,Set<ApiHaving>> havings)
DataApiRequestImpl withHaving(Having having)
DataApiRequestImpl withSorts(LinkedHashSet<OrderByColumn> sorts)
DataApiRequestImpl withCount(int count)
DataApiRequestImpl withTopN(int topN)
DataApiRequestImpl withAsyncAfter(long asyncAfter)
DataApiRequestImpl withTimeZone(org.joda.time.DateTimeZone timeZone)
DataApiRequestImpl withFilterBuilder(DruidFilterBuilder filterBuilder)
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.