Inputs
Input types in the Query API
DimensionInput
The fields for creating or modifying a Dimension.
The name of the column to create the Dimension from.
DataGridInput
The fields for querying Data Grid records.
The Data Pool to be queried.
The time range for retrieving the records.
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 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.
MetricReportInput
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 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.
One or more Metrics to include in the Metric Report. These will be broken down by dimensions
.
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.
MetricReportDimensionInput
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.
MetricReportMetricInput
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.
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.
DataPoolInput
The ID of the Data Pool.
The name of the Data Pool.
CustomMetricQueryInput
The Data Pool to which this Metric belongs.
Custom expression for defining the Metric.
CountMetricQueryInput
The Data Pool to which this Metric belongs.
SumMetricQueryInput
The Data Pool to which this Metric belongs.
The column to be summed.
AverageMetricQueryInput
The Data Pool to which this Metric belongs.
The column to be averaged.
MinMetricQueryInput
The Data Pool to which this Metric belongs.
The column to calculate the minimum from.
MaxMetricQueryInput
The Data Pool to which this Metric belongs.
The column to calculate the maximum from.
CountDistinctMetricQueryInput
The Data Pool to which this Metric belongs.
The column to count distinct values from.
MetricInput
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.
CounterInput
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 time range for calculating the counter.
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.
TimeSeriesInput
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 time range for calculating the time series.
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 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.
LeaderboardInput
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 time range for calculating the leaderboard.
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 sort order of the rows. It can be ascending (ASC
) or descending (DESC
) order. Defaults to descending (DESC
) order when not provided.
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.
TimeRangeInput
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.
FilterInput
The fields of a filter.
You can construct more complex filters using and
and or
. For example, to construct a filter equivalent to
you could write
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.
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.
SqlV1Input
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.
DescribeSqlV1Input
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.
RecordsByUniqueIdInput
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 columns to retrieve.
The unique IDs of the records to retrieve.
TopValuesInput
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 column to fetch the unique values from.
The time range for calculating the top values.
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.