DimensionInput

The fields for creating or modifying a Dimension.

columnName
String
required

The name of the column to create the Dimension from.

DataGridInput

The fields for querying Data Grid records.

dataPool
DataPoolInput
required

The Data Pool to be queried.

timeRange
TimeRangeInput

The time range for retrieving the records.

timeZone
String

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”.

columns
[String!]
required

The columns to retrieve.

orderByColumn
Int

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.

sort
Sort

The sort order of the rows. It can be ascending (ASC) or descending (DESC) order. Defaults to descending (DESC) order when not provided.

filterSql
String

The filters to apply to the records, in the form of SQL. You may only filter on columns included in the columns array input.

first
Int

The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.

after
String

The cursor to use when paging forward.

last
Int

The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.

before
String

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.

timeRange
TimeRangeInput

The time range for calculating the Metric Report.

timeZone
String

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”.

dimensions
[MetricReportDimensionInput!]
required

One or many dimensions to group the Metric values by. Typically, dimensions in a report are what you want to compare and rank.

metrics
[MetricReportMetricInput!]
required

One or more Metrics to include in the Metric Report. These will be broken down by dimensions.

filterSql
String

The Query Filters to apply when building the Metric Report, in the form of SQL. These can be used to filter out rows.

orderByColumn
Int

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.

first
Int

The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.

after
String

The cursor to use when paging forward.

last
Int

The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.

before
String

The cursor to use when paging backward.

MetricReportDimensionInput

The fields for specifying a dimension to include in a Metric Report.

columnName
String
required

The column name of the dimension to include in a Metric Report. This must match the name of a Data Pool column.

displayName
String

The name to display in the headers array when displaying the report. This defaults to the column name if unspecified.

sort
Sort

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.

metric
MetricInput

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.

displayName
String

The name to display in the headers array when displaying the report. This defaults to the Metric’s unique name if unspecified.

filterSql
String

The Query Filters to apply when calculating the Metric, in the form of SQL.

sort
Sort

The sort order for the Metric. It can be ascending (ASC) or descending (DESC) order. Defaults to descending (DESC) order when not provided.

DataPoolInput

id
ID

The ID of the Data Pool.

name
String

The name of the Data Pool.

CustomMetricQueryInput

dataPool
DataPoolInput
required

The Data Pool to which this Metric belongs.

expression
String
required

Custom expression for defining the Metric.

CountMetricQueryInput

dataPool
DataPoolInput
required

The Data Pool to which this Metric belongs.

SumMetricQueryInput

dataPool
DataPoolInput
required

The Data Pool to which this Metric belongs.

measure
DimensionInput
required

The column to be summed.

AverageMetricQueryInput

dataPool
DataPoolInput
required

The Data Pool to which this Metric belongs.

measure
DimensionInput
required

The column to be averaged.

MinMetricQueryInput

dataPool
DataPoolInput
required

The Data Pool to which this Metric belongs.

measure
DimensionInput
required

The column to calculate the minimum from.

MaxMetricQueryInput

dataPool
DataPoolInput
required

The Data Pool to which this Metric belongs.

measure
DimensionInput
required

The column to calculate the maximum from.

CountDistinctMetricQueryInput

dataPool
DataPoolInput
required

The Data Pool to which this Metric belongs.

dimension
DimensionInput
required

The column to count distinct values from.

MetricInput

id
ID

The ID of a pre-configured Metric.

name
String

The name of a pre-configured Metric.

custom
CustomMetricQueryInput

An ad hoc Custom Metric.

count
CountMetricQueryInput

An ad hoc Count Metric.

sum
SumMetricQueryInput

An ad hoc Sum Metric.

average
AverageMetricQueryInput

An ad hoc Average Metric.

min
MinMetricQueryInput

An ad hoc Min Metric.

max
MaxMetricQueryInput

An ad hoc Max Metric.

countDistinct
CountDistinctMetricQueryInput

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.

metric
MetricInput

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.

timeRange
TimeRangeInput

The time range for calculating the counter.

timeZone
String

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”.

filterSql
String

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.

metric
MetricInput

The Metric to Query. It can be a pre-created one or it can be inlined here.

timeRange
TimeRangeInput

The time range for calculating the time series.

timeZone
String

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”.

granularity
TimeSeriesGranularity
required

The time granularity (hour, day, month, etc.) to aggregate the Metric values by.

filterSql
String

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.

groupBy
[String!]

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.

metric
MetricInput

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.

timeRange
TimeRangeInput

The time range for calculating the leaderboard.

timeZone
String

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”.

dimensions
[DimensionInput!]
required

One or many Dimensions to group the Metric values by. Typically, Dimensions in a leaderboard are what you want to compare and rank.

sort
Sort

The sort order of the rows. It can be ascending (ASC) or descending (DESC) order. Defaults to descending (DESC) order when not provided.

rowLimit
Int
required

The number of rows to be returned. It can be a number between 1 and 1,000.

filterSql
String

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.

timestamp
String

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.

relative
RelativeTimeRange

The relative time period.

n
Int

The number of time units for the LAST_N relative periods.

start
DateTime

The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.

stop
DateTime

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

(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.

column
String
required

The name of the column to filter on.

operator
FilterOperator
required

The operation to perform when comparing the column and filter values.

value
String

The value to compare the column to.

and
[FilterInput!]

Additional filters to AND with this one. AND takes precedence over OR.

or
[FilterInput!]

Additional filters to OR with this one. AND takes precedence over OR.

SqlV1Input

Input to the SqlV1 api.

query
String
required

The SQL query.

dialect
SqlDialectV1

The SQL dialect to use. If not provided, the query is parsed on a best-effort basis.

DescribeSqlV1Input

Input for describing SqlV1 inputs.

query
String
required

The SQL query.

dialect
SqlDialectV1

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.

dataPool
DataPoolInput
required

The Data Pool to be queried. A Data Pool ID or unique name can be provided.

columns
[String!]
required

The columns to retrieve.

uniqueIds
[String!]
required

The unique IDs of the records to retrieve.

TopValuesInput

The fields for querying the top values in a given column.

dataPool
DataPoolInput
required

The Data Pool to be queried. A Data Pool ID or unique name can be provided.

columnName
String
required

The column to fetch the unique values from.

timeRange
TimeRangeInput

The time range for calculating the top values.

timeZone
String

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”.

maxValues
Int

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.