Types
Object types in the Query API
PageInfo
The page info object used for pagination.
Points to the first item returned in the results. Used when paginating backward.
Points to the last item returned in the results. Used when paginating forward.
A boolean that indicates whether a next page of results exists. Can be used to display a “next page” button in user interfaces, for example.
A boolean that indicates whether a previous page of results exists. Can be used to display a “previous page” button in user interfaces, for example.
MetricReportConnection
The Metric Report connection object.
It includes headers
and rows
for a single page of a report. It also allows paging forward and backward to other
pages of the report.
The report connection’s page info.
The page info object used for pagination.
Points to the first item returned in the results. Used when paginating backward.
Points to the last item returned in the results. Used when paginating forward.
A boolean that indicates whether a next page of results exists. Can be used to display a “next page” button in user interfaces, for example.
A boolean that indicates whether a previous page of results exists. Can be used to display a “previous page” button in user interfaces, for example.
The report connection’s edges.
The Metric Report edge object.
The edge’s node.
The Metric Report node object.
This type represents a single row of a report.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of columns. Each column contains the dimension and Metric values for a single row, as defined in the report input. Use this to display a single row within your table.
The edge’s cursor.
The report connection’s nodes.
The Metric Report node object.
This type represents a single row of a report.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of columns. Each column contains the dimension and Metric values for a single row, as defined in the report input. Use this to display a single row within your table.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of rows. Each row contains dimension and Metric values, as defined in the report input. Use these to display the rows of your table.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
MetricReportEdge
The Metric Report edge object.
The edge’s node.
The Metric Report node object.
This type represents a single row of a report.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of columns. Each column contains the dimension and Metric values for a single row, as defined in the report input. Use this to display a single row within your table.
The edge’s cursor.
MetricReportNode
The Metric Report node object.
This type represents a single row of a report.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of columns. Each column contains the dimension and Metric values for a single row, as defined in the report input. Use this to display a single row within your table.
TimeSeriesResponse
The time series response object. It contains an array of time series labels and an array of Metric values for the given time range and Query Filters.
The time series labels.
The time series values.
The time series values for each group in groupBy
, if specified.
The time series response object for a group specified in groupBy
. It contains an array of time series labels and an array of Metric values for a particular group.
The time series group’s columns.
The time series group’s labels.
The time series group’s values.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
TimeSeriesResponseGroup
The time series response object for a group specified in groupBy
. It contains an array of time series labels and an array of Metric values for a particular group.
The time series group’s columns.
The time series group’s labels.
The time series group’s values.
CounterResponse
The counter response object. It contains a single Metric value for the given time range and Query Filters.
The value of the counter.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
LeaderboardResponse
The leaderboard response object. It contains an array of headers and a table (array of rows) with the selected Dimensions and corresponding Metric values for the given time range and Query Filters.
The table headers. It contains the Dimension and Metric names.
An ordered array of rows. Each row contains the Dimension values and the corresponding Metric value. A Dimension value can be empty. A Metric value will never be empty.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
QueryInfo
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
SqlColumnResponse
The name of the returned column.
The returned column’s type.
The Propel data types.
BOOLEAN
: True or false.STRING
: A variable-length string.FLOAT
: A 32-bit signed double-precision floating point number.DOUBLE
: A 64-bit signed double-precision floating point number.INT8
: An 8-bit signed integer, with a minimum value of -2⁷ and a maximum value of 2⁷-1.INT16
: A 16-bit signed integer, with a minimum value of -2¹⁵ and a maximum value of 2¹⁵-1.INT32
: A 32-bit signed integer, with a minimum value of -2³¹ and a maximum value of 2³¹-1.INT64
: A 64-bit signed integer, with a minimum value of -2⁶³ and a maximum value of 2⁶³-1.DATE
: A date without a timestamp. For example, “YYYY-MM-DD”.TIMESTAMP
: A date with a timestamp. For example, “yyy-MM-dd HH:mm:ss”.JSON
: A JavaScript Object Notation (JSON) document.CLICKHOUSE
: A ClickHouse-specific type.
Whether the column is nullable, meaning whether it accepts a null value.
SqlResponse
Response from the SQL API.
The column names in the same order as present in the data
field.
The name of the returned column.
The returned column’s type.
The Propel data types.
BOOLEAN
: True or false.STRING
: A variable-length string.FLOAT
: A 32-bit signed double-precision floating point number.DOUBLE
: A 64-bit signed double-precision floating point number.INT8
: An 8-bit signed integer, with a minimum value of -2⁷ and a maximum value of 2⁷-1.INT16
: A 16-bit signed integer, with a minimum value of -2¹⁵ and a maximum value of 2¹⁵-1.INT32
: A 32-bit signed integer, with a minimum value of -2³¹ and a maximum value of 2³¹-1.INT64
: A 64-bit signed integer, with a minimum value of -2⁶³ and a maximum value of 2⁶³-1.DATE
: A date without a timestamp. For example, “YYYY-MM-DD”.TIMESTAMP
: A date with a timestamp. For example, “yyy-MM-dd HH:mm:ss”.JSON
: A JavaScript Object Notation (JSON) document.CLICKHOUSE
: A ClickHouse-specific type.
Whether the column is nullable, meaning whether it accepts a null value.
The data gathered by the SQL query. The data is returned in an N x M matrix format, where the first dimension are the rows retrieved, and the second dimension are the columns. Each cell can be either a string or null, and the string can represent a number, text, date or boolean value.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
DescribeSqlResponse
Response from the describe SQL API.
The columns that the query would return.
The name of the returned column.
The returned column’s type.
The Propel data types.
BOOLEAN
: True or false.STRING
: A variable-length string.FLOAT
: A 32-bit signed double-precision floating point number.DOUBLE
: A 64-bit signed double-precision floating point number.INT8
: An 8-bit signed integer, with a minimum value of -2⁷ and a maximum value of 2⁷-1.INT16
: A 16-bit signed integer, with a minimum value of -2¹⁵ and a maximum value of 2¹⁵-1.INT32
: A 32-bit signed integer, with a minimum value of -2³¹ and a maximum value of 2³¹-1.INT64
: A 64-bit signed integer, with a minimum value of -2⁶³ and a maximum value of 2⁶³-1.DATE
: A date without a timestamp. For example, “YYYY-MM-DD”.TIMESTAMP
: A date with a timestamp. For example, “yyy-MM-dd HH:mm:ss”.JSON
: A JavaScript Object Notation (JSON) document.CLICKHOUSE
: A ClickHouse-specific type.
Whether the column is nullable, meaning whether it accepts a null value.
DataGridConnection
The Data Grid connection.
It includes headers
and rows
for a single page of a Data Grid table. It also allows paging forward and backward to other
pages of the Data Grid table.
The Data Grid table’s headers.
An array of arrays containing the values of the Data Grid table’s rows.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
The Data Grid table’s page info.
The page info object used for pagination.
Points to the first item returned in the results. Used when paginating backward.
Points to the last item returned in the results. Used when paginating forward.
A boolean that indicates whether a next page of results exists. Can be used to display a “next page” button in user interfaces, for example.
A boolean that indicates whether a previous page of results exists. Can be used to display a “previous page” button in user interfaces, for example.
The Data Grid table’s edges.
The Data Grid edge object.
The edge’s node.
The Data Grid table’s node.
This type represents a single row of a Data Grid table.
The Data Grid table’s headers.
An array of the values for the row.
The edge’s cursor.
The Data Grid table’s nodes.
The Data Grid table’s node.
This type represents a single row of a Data Grid table.
The Data Grid table’s headers.
An array of the values for the row.
DataGridEdge
The Data Grid edge object.
The edge’s node.
The Data Grid table’s node.
This type represents a single row of a Data Grid table.
The Data Grid table’s headers.
An array of the values for the row.
The edge’s cursor.
DataGridNode
The Data Grid table’s node.
This type represents a single row of a Data Grid table.
The Data Grid table’s headers.
An array of the values for the row.
RecordsByUniqueIdResponse
The Data Pool columns for the record.
An array of values for the record.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL
: Max records per second: 5,000,000 records per secondP1_SMALL
: Max records per second: 25,000,000 records per secondP1_MEDIUM
: Max records per second: 100,000,000 records per secondP1_LARGE
: Max records per second: 250,000,000 records per secondP1_X_LARGE
: Max records per second: 500,000,000 records per second
The Query status.
The Query status.
COMPLETED
: The Query was completed succesfully.ERROR
: The Query experienced an error.TIMED_OUT
: The Query timed out.
The Query type.
The Query type.
METRIC
: Indicates a Metric Query.STATS
: Indicates a Dimension Stats Query.REPORT
: Indicates a Report Query.RECORDS
: Indicates a Record Table Query.RECORDS_BY_UNIQUE_ID
: Indicates records queried by unique ID.SELECT
: Indicates a SelectV1 Query.SQL
: Indicates a SQL Query.TOP_VALUES
: Indicates a Top Values Query.
The Query subtype.
The Query subtype.
COUNTER
: Indicates a Metric counter Query.TIME_SERIES
: Indicates a Metric time series Query.LEADERBOARD
: Indicates a Metric leaderboard Query.
The SQL the query executed.
TopValuesResponse
An array with the list of values.
Build a report, or table, consisting of multiple Metrics broken down by one-or-more dimensions.
The first few columns of the report are the dimensions you choose to break down by. The subsequent columns are the
Metrics you choose to query. By default, the report sorts on the first Metric in descending order, but you can
configure this with the orderByMetric
and sort
inputs.
Finally, reports use cursor-based pagination. You can control page size with the first
and
last
inputs.
Arguments
The fields for querying a Metric Report.
A Metric Report is a table whose columns include dimensions and Metric values, calculated over a given time range.
The time range for calculating the Metric Report.
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.
If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.
If both relative and absolute time ranges are provided, the relative time range will take precedence.
If a LAST_N
relative time period is selected, an n
≥ 1 must be provided. If no n
is provided or n
< 1, a BAD_REQUEST
error will be returned.
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any. Set this to filter on an alternative timestamp field.
The relative time period.
The number of time units for the LAST_N
relative periods.
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
One or many dimensions to group the Metric values by. Typically, dimensions in a report are what you want to compare and rank.
The fields for specifying a dimension to include in a Metric Report.
The column name of the dimension to include in a Metric Report. This must match the name of a Data Pool column.
The name to display in the headers
array when displaying the report. This defaults to the column name if unspecified.
The sort order for the dimension. It can be ascending (ASC
) or descending (DESC
) order. Defaults to ascending (ASC
) order when not provided.
See Sort
One or more Metrics to include in the Metric Report. These will be broken down by dimensions
.
The fields for specifying a Metric to include in a Metric Report.
The Metric to query. You can query a pre-configured Metric by ID or name, or you can query an ad hoc Metric that you define inline.
See MetricInput
The name to display in the headers
array when displaying the report. This defaults to the Metric’s unique name if unspecified.
The Query Filters to apply when calculating the Metric, in the form of SQL.
The sort order for the Metric. It can be ascending (ASC
) or descending (DESC
) order. Defaults to descending (DESC
) order when not provided.
See Sort
The Metric’s unique name. If not specified, Propel will lookup the Metric by ID.
deprecated: Usemetric
The Metric’s ID. If not specified, Propel will lookup the Metric by unique name.
deprecated: Usemetric
The Query Filters to apply when calculating the Metric.
deprecated: UsefilterSql
insteadSee FilterInput
The Query Filters to apply when building the Metric Report, in the form of SQL. These can be used to filter out rows.
The index of the column to order the Metric Report by. The index is 1-based and defaults to the first Metric column. In other words, by default, reports are ordered by the first Metric; however, you can order by the second Metric, third Metric, etc., by overriding the orderByColumn
input. You can also order by dimensions this way.
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
The cursor to use when paging forward.
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
The cursor to use when paging backward.
The Query Filters to apply when building the Metric Report. These can be used to filter out rows.
deprecated: UsefilterSql
insteadThe fields of a filter.
You can construct more complex filters using and
and or
. For example, to construct a filter equivalent to
(value > 0 AND value <= 100) OR status = "confirmed"
you could write
{
"column": "value",
"operator": "GREATER_THAN",
"value": "0",
"and": [{
"column": "value",
"operator": "LESS_THAN_OR_EQUAL_TO",
"value": "0"
}],
"or": [{
"column": "status",
"operator": "EQUALS",
"value": "confirmed"
}]
}
Note that and
takes precedence over or
.
The name of the column to filter on.
The operation to perform when comparing the column and filter values.
See FilterOperator
The value to compare the column to.
Additional filters to AND with this one. AND takes precedence over OR.
Additional filters to OR with this one. AND takes precedence over OR.
The Metric Report connection object.
It includes headers
and rows
for a single page of a report. It also allows paging forward and backward to other
pages of the report.
The report connection’s page info.
The page info object used for pagination.
Points to the first item returned in the results. Used when paginating backward.
Points to the last item returned in the results. Used when paginating forward.
A boolean that indicates whether a next page of results exists. Can be used to display a “next page” button in user interfaces, for example.
A boolean that indicates whether a previous page of results exists. Can be used to display a “previous page” button in user interfaces, for example.
The report connection’s edges.
The Metric Report edge object.
The edge’s node.
See MetricReportNode
The edge’s cursor.
The report connection’s nodes.
The Metric Report node object.
This type represents a single row of a report.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of columns. Each column contains the dimension and Metric values for a single row, as defined in the report input. Use this to display a single row within your table.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of rows. Each row contains dimension and Metric values, as defined in the report input. Use these to display the rows of your table.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.
Query Data Pools using SQL.
Arguments
Input to the SqlV1 api.
The SQL query.
The SQL dialect to use. If not provided, the query is parsed on a best-effort basis.
The SQL dialect to use when parsing queries.
POSTGRESQL
: Parse as PostgreSQL-compatible SQL.CLICKHOUSE
: Parse as ClickHouse-compatible SQL.
Response from the SQL API.
The column names in the same order as present in the data
field.
The name of the returned column.
The returned column’s type.
See ColumnType
Whether the column is nullable, meaning whether it accepts a null value.
The data gathered by the SQL query. The data is returned in an N x M matrix format, where the first dimension are the rows retrieved, and the second dimension are the columns. Each cell can be either a string or null, and the string can represent a number, text, date or boolean value.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.
Describe SQL statements Data Pools.
Arguments
Input for describing SqlV1 inputs.
The SQL query.
The SQL dialect to use. If not provided, the query is parsed on a best-effort basis.
The SQL dialect to use when parsing queries.
POSTGRESQL
: Parse as PostgreSQL-compatible SQL.CLICKHOUSE
: Parse as ClickHouse-compatible SQL.
Response from the describe SQL API.
The columns that the query would return.
The name of the returned column.
The returned column’s type.
See ColumnType
Whether the column is nullable, meaning whether it accepts a null value.
This query returns the individual records of a Data Pool with the convenience of built-in pagination, filtering, and sorting.
Arguments
The fields for querying Data Grid records.
The Data Pool to be queried.
The ID of the Data Pool.
The name of the Data Pool.
The time range for retrieving the records.
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.
If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.
If both relative and absolute time ranges are provided, the relative time range will take precedence.
If a LAST_N
relative time period is selected, an n
≥ 1 must be provided. If no n
is provided or n
< 1, a BAD_REQUEST
error will be returned.
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any. Set this to filter on an alternative timestamp field.
The relative time period.
The number of time units for the LAST_N
relative periods.
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
The columns to retrieve.
The index of the column to order the table by. The index is 1-based. If not provided, records will be ordered by their timestamp by default.
The sort order of the rows. It can be ascending (ASC
) or descending (DESC
) order. Defaults to descending (DESC
) order when not provided.
The available sort orders.
ASC
: Sort in ascending order.DESC
: Sort in descending order.
The filters to apply to the records, in the form of SQL. You may only filter on columns included in the columns
array input.
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
The cursor to use when paging forward.
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
The cursor to use when paging backward.
The filters to apply to the records. You may only filter on columns included in the columns
array input.
filterSql
insteadThe fields of a filter.
You can construct more complex filters using and
and or
. For example, to construct a filter equivalent to
(value > 0 AND value <= 100) OR status = "confirmed"
you could write
{
"column": "value",
"operator": "GREATER_THAN",
"value": "0",
"and": [{
"column": "value",
"operator": "LESS_THAN_OR_EQUAL_TO",
"value": "0"
}],
"or": [{
"column": "status",
"operator": "EQUALS",
"value": "confirmed"
}]
}
Note that and
takes precedence over or
.
The name of the column to filter on.
The operation to perform when comparing the column and filter values.
See FilterOperator
The value to compare the column to.
Additional filters to AND with this one. AND takes precedence over OR.
Additional filters to OR with this one. AND takes precedence over OR.
The Data Grid connection.
It includes headers
and rows
for a single page of a Data Grid table. It also allows paging forward and backward to other
pages of the Data Grid table.
The Data Grid table’s headers.
An array of arrays containing the values of the Data Grid table’s rows.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.
The Data Grid table’s page info.
The page info object used for pagination.
Points to the first item returned in the results. Used when paginating backward.
Points to the last item returned in the results. Used when paginating forward.
A boolean that indicates whether a next page of results exists. Can be used to display a “next page” button in user interfaces, for example.
A boolean that indicates whether a previous page of results exists. Can be used to display a “previous page” button in user interfaces, for example.
The Data Grid table’s edges.
The Data Grid edge object.
The edge’s node.
See DataGridNode
The edge’s cursor.
The Data Grid table’s nodes.
The Data Grid table’s node.
This type represents a single row of a Data Grid table.
The Data Grid table’s headers.
An array of the values for the row.
This query returns records by the given unique IDs.
Arguments
The fields for querying records by unique ID.
The Data Pool to be queried. A Data Pool ID or unique name can be provided.
The ID of the Data Pool.
The name of the Data Pool.
The columns to retrieve.
The unique IDs of the records to retrieve.
The Data Pool columns for the record.
An array of values for the record.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.
This query returns an array of the most frequent values in a given column. The resulting array is sorted in descending order of approximate frequency of values.
Arguments
The fields for querying the top values in a given column.
The Data Pool to be queried. A Data Pool ID or unique name can be provided.
The ID of the Data Pool.
The name of the Data Pool.
The column to fetch the unique values from.
The time range for calculating the top values.
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.
If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.
If both relative and absolute time ranges are provided, the relative time range will take precedence.
If a LAST_N
relative time period is selected, an n
≥ 1 must be provided. If no n
is provided or n
< 1, a BAD_REQUEST
error will be returned.
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any. Set this to filter on an alternative timestamp field.
The relative time period.
The number of time units for the LAST_N
relative periods.
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
The maximum number of values to return. It can be a number between 1 and 1,000. If the parameter is omitted, default value 10 is used.
An array with the list of values.
Query a metric in counter format. Returns a single metric value for the given time range and filters.
Arguments
The fields for querying a Metric in counter format.
A Metric’s counter query returns a single value over a given time range.
The Metric to query. You can query a pre-configured Metric by ID or name, or you can query an ad hoc Metric that you define inline.
The ID of a pre-configured Metric.
The name of a pre-configured Metric.
An ad hoc Custom Metric.
An ad hoc Count Metric.
An ad hoc Sum Metric.
An ad hoc Average Metric.
An ad hoc Min Metric.
An ad hoc Max Metric.
An ad hoc Count Distinct Metric.
The time range for calculating the counter.
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.
If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.
If both relative and absolute time ranges are provided, the relative time range will take precedence.
If a LAST_N
relative time period is selected, an n
≥ 1 must be provided. If no n
is provided or n
< 1, a BAD_REQUEST
error will be returned.
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any. Set this to filter on an alternative timestamp field.
The relative time period.
The number of time units for the LAST_N
relative periods.
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
The Query Filters to apply before retrieving the counter data, in the form of SQL. If no Query Filters are provided, all data is included.
The ID of the Metric to query.
Required if metricName
is not specified.
metric
The name of the Metric to query.
Required if metricId
is not specified.
metric
The Query Filters to apply before retrieving the counter data. If no Query Filters are provided, all data is included.
deprecated: UsefilterSql
insteadThe fields of a filter.
You can construct more complex filters using and
and or
. For example, to construct a filter equivalent to
(value > 0 AND value <= 100) OR status = "confirmed"
you could write
{
"column": "value",
"operator": "GREATER_THAN",
"value": "0",
"and": [{
"column": "value",
"operator": "LESS_THAN_OR_EQUAL_TO",
"value": "0"
}],
"or": [{
"column": "status",
"operator": "EQUALS",
"value": "confirmed"
}]
}
Note that and
takes precedence over or
.
The name of the column to filter on.
The operation to perform when comparing the column and filter values.
See FilterOperator
The value to compare the column to.
Additional filters to AND with this one. AND takes precedence over OR.
Additional filters to OR with this one. AND takes precedence over OR.
The counter response object. It contains a single Metric value for the given time range and Query Filters.
The value of the counter.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.
Query metrics in counter format. Returns a metric value for each input in the array of inputs.
Arguments
The fields for querying a Metric in counter format.
A Metric’s counter query returns a single value over a given time range.
The Metric to query. You can query a pre-configured Metric by ID or name, or you can query an ad hoc Metric that you define inline.
The ID of a pre-configured Metric.
The name of a pre-configured Metric.
An ad hoc Custom Metric.
An ad hoc Count Metric.
An ad hoc Sum Metric.
An ad hoc Average Metric.
An ad hoc Min Metric.
An ad hoc Max Metric.
An ad hoc Count Distinct Metric.
The time range for calculating the counter.
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.
If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.
If both relative and absolute time ranges are provided, the relative time range will take precedence.
If a LAST_N
relative time period is selected, an n
≥ 1 must be provided. If no n
is provided or n
< 1, a BAD_REQUEST
error will be returned.
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any. Set this to filter on an alternative timestamp field.
The relative time period.
The number of time units for the LAST_N
relative periods.
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
The Query Filters to apply before retrieving the counter data, in the form of SQL. If no Query Filters are provided, all data is included.
The ID of the Metric to query.
Required if metricName
is not specified.
metric
The name of the Metric to query.
Required if metricId
is not specified.
metric
The Query Filters to apply before retrieving the counter data. If no Query Filters are provided, all data is included.
deprecated: UsefilterSql
insteadThe fields of a filter.
You can construct more complex filters using and
and or
. For example, to construct a filter equivalent to
(value > 0 AND value <= 100) OR status = "confirmed"
you could write
{
"column": "value",
"operator": "GREATER_THAN",
"value": "0",
"and": [{
"column": "value",
"operator": "LESS_THAN_OR_EQUAL_TO",
"value": "0"
}],
"or": [{
"column": "status",
"operator": "EQUALS",
"value": "confirmed"
}]
}
Note that and
takes precedence over or
.
The name of the column to filter on.
The operation to perform when comparing the column and filter values.
See FilterOperator
The value to compare the column to.
Additional filters to AND with this one. AND takes precedence over OR.
Additional filters to OR with this one. AND takes precedence over OR.
The counter response object. It contains a single Metric value for the given time range and Query Filters.
The value of the counter.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.
Query a metric in time series format. Returns arrays of timestamps and metric values for the given time range and filters.
Arguments
The fields for querying a Metric in time series format.
A Metric’s time series query returns the values over a given time range aggregated by a given time granularity; day, month, or year, for example.
The Metric to Query. It can be a pre-created one or it can be inlined here.
The ID of a pre-configured Metric.
The name of a pre-configured Metric.
An ad hoc Custom Metric.
An ad hoc Count Metric.
An ad hoc Sum Metric.
An ad hoc Average Metric.
An ad hoc Min Metric.
An ad hoc Max Metric.
An ad hoc Count Distinct Metric.
The time range for calculating the time series.
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.
If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.
If both relative and absolute time ranges are provided, the relative time range will take precedence.
If a LAST_N
relative time period is selected, an n
≥ 1 must be provided. If no n
is provided or n
< 1, a BAD_REQUEST
error will be returned.
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any. Set this to filter on an alternative timestamp field.
The relative time period.
The number of time units for the LAST_N
relative periods.
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
The time granularity (hour, day, month, etc.) to aggregate the Metric values by.
The available time series granularities. Granularities define the unit of time to aggregate the Metric data for a time series query.
For example, if the granularity is set to DAY
, then the the time series query will return a label and a value for each day.
If there are no records for a given time series granularity, Propel will return the label and a value of “0” so that the time series can be properly visualized.
MINUTE
: Aggregates values by minute intervals.FIVE_MINUTES
: Aggregates values by 5-minute intervals.TEN_MINUTES
: Aggregates values by 10-minute intervals.FIFTEEN_MINUTES
: Aggregates values by 15-minute intervals.HOUR
: Aggregates values by hourly intervals.DAY
: Aggregates values by daily intervals.WEEK
: Aggregates values by weekly intervals.MONTH
: Aggregates values by monthly intervals.YEAR
: Aggregates values by yearly intervals.
The Query Filters to apply before retrieving the time series data, in the form of SQL. If no Query Filters are provided, all data is included.
Columns to group by.
The ID of the Metric to query.
Required if metricName
is not specified.
metric
The name of the Metric to query.
Required if metricId
is not specified.
metric
The Query Filters to apply before retrieving the time series data. If no Query Filters are provided, all data is included.
deprecated: UsefilterSql
insteadThe fields of a filter.
You can construct more complex filters using and
and or
. For example, to construct a filter equivalent to
(value > 0 AND value <= 100) OR status = "confirmed"
you could write
{
"column": "value",
"operator": "GREATER_THAN",
"value": "0",
"and": [{
"column": "value",
"operator": "LESS_THAN_OR_EQUAL_TO",
"value": "0"
}],
"or": [{
"column": "status",
"operator": "EQUALS",
"value": "confirmed"
}]
}
Note that and
takes precedence over or
.
The name of the column to filter on.
The operation to perform when comparing the column and filter values.
See FilterOperator
The value to compare the column to.
Additional filters to AND with this one. AND takes precedence over OR.
Additional filters to OR with this one. AND takes precedence over OR.
The time series response object. It contains an array of time series labels and an array of Metric values for the given time range and Query Filters.
The time series labels.
The time series values.
The time series values for each group in groupBy
, if specified.
The time series response object for a group specified in groupBy
. It contains an array of time series labels and an array of Metric values for a particular group.
The time series group’s columns.
The time series group’s labels.
The time series group’s values.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.
Query a metric in leaderboard format. Returns a table (array of rows) with the selected dimensions and the metric’s corresponding values for the given time range and filters.
Arguments
The fields for querying a Metric in leaderboard format.
A Metric’s leaderboard query returns an ordered table of Dimension and Metric values over a given time range.
The Metric to query. You can query a pre-configured Metric by ID or name, or you can query an ad hoc Metric that you define inline.
The ID of a pre-configured Metric.
The name of a pre-configured Metric.
An ad hoc Custom Metric.
An ad hoc Count Metric.
An ad hoc Sum Metric.
An ad hoc Average Metric.
An ad hoc Min Metric.
An ad hoc Max Metric.
An ad hoc Count Distinct Metric.
The time range for calculating the leaderboard.
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.
If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.
If both relative and absolute time ranges are provided, the relative time range will take precedence.
If a LAST_N
relative time period is selected, an n
≥ 1 must be provided. If no n
is provided or n
< 1, a BAD_REQUEST
error will be returned.
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any. Set this to filter on an alternative timestamp field.
The relative time period.
The number of time units for the LAST_N
relative periods.
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
One or many Dimensions to group the Metric values by. Typically, Dimensions in a leaderboard are what you want to compare and rank.
The fields for creating or modifying a Dimension.
The name of the column to create the Dimension from.
The sort order of the rows. It can be ascending (ASC
) or descending (DESC
) order. Defaults to descending (DESC
) order when not provided.
The available sort orders.
ASC
: Sort in ascending order.DESC
: Sort in descending order.
The number of rows to be returned. It can be a number between 1 and 1,000.
The Query Filters to apply before retrieving the leaderboard data, in the form of SQL. If no Query Filters are provided, all data is included.
The ID of the Metric to query.
Required if metricName
is not specified.
metric
The name of the Metric to query.
Required if metricId
is not specified.
metric
The Query Filters to apply before retrieving the leaderboard data. If no Query Filters are provided, all data is included.
deprecated: UsefilterSql
insteadThe fields of a filter.
You can construct more complex filters using and
and or
. For example, to construct a filter equivalent to
(value > 0 AND value <= 100) OR status = "confirmed"
you could write
{
"column": "value",
"operator": "GREATER_THAN",
"value": "0",
"and": [{
"column": "value",
"operator": "LESS_THAN_OR_EQUAL_TO",
"value": "0"
}],
"or": [{
"column": "status",
"operator": "EQUALS",
"value": "confirmed"
}]
}
Note that and
takes precedence over or
.
The name of the column to filter on.
The operation to perform when comparing the column and filter values.
See FilterOperator
The value to compare the column to.
Additional filters to AND with this one. AND takes precedence over OR.
Additional filters to OR with this one. AND takes precedence over OR.
The leaderboard response object. It contains an array of headers and a table (array of rows) with the selected Dimensions and corresponding Metric values for the given time range and Query Filters.
The table headers. It contains the Dimension and Metric names.
An ordered array of rows. Each row contains the Dimension values and the corresponding Metric value. A Dimension value can be empty. A Metric value will never be empty.
The Query statistics and metadata.
The Query Info object. It contains metadata and statistics about a Query performed.
The Query’s unique identifier.
The date and time in UTC when the Query was created.
The unique identifier of the actor that performed the Query.
The date and time in UTC when the Query was last modified.
The unique identifier of the actor that modified the Query.
The bytes processed by the Query.
The duration of the Query in milliseconds.
The number of records processed by the Query.
The bytes returned by the Query.
The number of records returned by the Query.
The Propeller used for this query.
See Propeller
The Query status.
See QueryStatus
The Query type.
See QueryType
The Query subtype.
See QuerySubtype
The SQL the query executed.