GroupByQueryParameters

Extends \DruidFamiliar\Abstracts\AbstractTaskParameters Implements \DruidFamiliar\Interfaces\IDruidQueryParameters

Class GroupByQueryParameters

Class AbstractTaskParameters

package

DruidFamiliar\QueryParameters

author

Ernesto Spiro Peimbert Andreakis

version 1.0
category

WebPT

copyright

Copyright (c) 2014 WebPT, Inc.

Methods

Class constructor

__construct() 

Adds a new aggregator to the aggregators array

addAggregator(\stdClass $aggregator) : $this

Arguments

$aggregator

\stdClass

Response

$this

Adds a new context to the contexts array

addContext(string $context) : $this

Arguments

$context

string

Response

$this

Adds a new dimension to the dimensions array

addDimension(string $dimension) : $this

Arguments

$dimension

string

Response

$this

Adds a new interval to the intervals array

addInterval(string $interval) : $this

Arguments

$interval

string

Response

$this

Adds a new postaggregator to the postaggregators array

addPostAggregator(\stdClass $aggregator) : $this

Arguments

$aggregator

\stdClass

Response

$this

Returns the aggregations

getAggregations() : array

Response

array

Returns the context

getContext() : array

Response

array

Returns the dataSource

getDataSource() : string

Response

string

Returns the dimensions

getDimensions() : array

Response

array

Returns the filter

getFilter() : \stdClass

Response

\stdClass

Returns the granularity

getGranularity() : string

Response

string

Returns the having

getHaving() : \stdClass

Response

\stdClass

Returns the intervals

getIntervals() : array

Response

array

Converts the current object into a JSON representation to be used as a query

getJSONString() : mixed|string

Response

mixed|string

Returns the limitSpec

getLimitSpec() : \stdClass

Response

\stdClass

Returns the postAggregations

getPostAggregations() : array

Response

array

Class initializer

initialize() 

isValid

isValid() : boolean
inherited

Response

boolean

Sets the aggregations

setAggregations(array $aggregations) : $this

Arguments

$aggregations

array

Response

$this

Sets the context

setContext(array $contexts) : $this

Arguments

$contexts

array

Response

$this

Sets the dataSource

setDataSource(string $dataSource) : $this

Arguments

$dataSource

string

Response

$this

Sets the dimensions

setDimensions(array $dimensions) : $this

Arguments

$dimensions

array

Response

$this

Sets the filter

setFilter(\stdClass $filter) : $this

Arguments

$filter

\stdClass

Response

$this

Sets the granularity

setGranularity(string $granularity) : $this

Arguments

$granularity

string

Response

$this

Sets the having

setHaving(\stdClass $having) : $this

Arguments

$having

\stdClass

Response

$this

Sets the intervals

setIntervals(array $intervals) : $this

Arguments

$intervals

array

Response

$this

Sets the limitSpec

setLimitSpec(\stdClass $limitSpec) : $this

Arguments

$limitSpec

\stdClass

Response

$this

Sets the postAggregations

setPostAggregations(array $postAggregations) : $this

Arguments

$postAggregations

array

Response

$this

Validates the query has the necessary parameters

validate() 
throws

Properties

This String should always be "groupBy"; this is the first thing Druid looks at to figure out how to interpret the query

queryType : string
access

protected

var

Type(s)

string

A String defining the data source to query, very similar to a table in a relational database, or a DataSource structure.

dataSource : string
access

protected

var

Type(s)

string

A JSON list of dimensions to do the groupBy over

dimensions : array
access

protected

var

Type(s)

array

Provides the functionality to sort and limit the set of results from a groupBy query

limitSpec : \stdClass
see
access

protected

var

Type(s)

\stdClass

A JSON string identifying which rows from a groupBy query should be returned, by specifying conditions on aggregated values.

having : \stdClass
access

protected

var

Type(s)

\stdClass

Defines the granularity of the query

granularity : string
access

protected

var

Type(s)

string

A filter is a JSON string indicating which rows of data should be included in the computation for a query.

filter : \stdClass
access

protected

var

Type(s)

\stdClass

Specifications of processing over metrics available in Druid

aggregations : array
access

protected

var

Type(s)

array

Specifications of processing that should happen on aggregated values as they come out of Druid

postAggregations : array
access

protected

var

Type(s)

array

A JSON string representing ISO-8601 Intervals. This defines the time ranges to run the query over

intervals : array
access

protected

var

Type(s)

array

An additional JSON Object which can be used to specify certain flags.

context : array
access

protected

var

Type(s)

array

List of all parameters. Needed to create the JSON string

allParameters : array
access

protected

var

Type(s)

array

Array of required params

requiredParams : array
access

protected

var

Type(s)

array

Stores the missing parameters

missingParameters : array
access

protected

var

Type(s)

array

Stores any empty parameter

emptyParameters : array
access

protected

var

Type(s)

array