Queries
counter
Query a metric in counter format. Returns a single metric value for the given time range and filters.
Arguments
input required CounterInput
The fields for querying a Metric in counter format.
A Metric's counter query returns a single value over a given time range.
input.metric optional 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.
input.timeRange optional TimeRangeInput
The time range for calculating the counter.
input.timeZone optional 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".
input.filterSql optional 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.
Returns
Nullable CounterResponse
The counter response object. It contains a single Metric value for the given time range and Query Filters.
counters
Query metrics in counter format. Returns a metric value for each input in the array of inputs.
Arguments
input required array of CounterInput
The fields for querying a Metric in counter format.
A Metric's counter query returns a single value over a given time range.
input.metric optional 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.
input.timeRange optional TimeRangeInput
The time range for calculating the counter.
input.timeZone optional 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".
input.filterSql optional 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.
Returns
Non-null Array of CounterResponse
The counter response object. It contains a single Metric value for the given time range and Query Filters.
dataGrid
This query returns the individual records of a Data Pool with the convenience of built-in pagination, filtering, and sorting.
Arguments
input required DataGridInput
The fields for querying Data Grid records.
input.dataPool required DataPoolInput
The Data Pool to be queried.
input.timeRange optional TimeRangeInput
The time range for retrieving the records.
input.timeZone optional 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".
input.columns required array of String
The columns to retrieve.
input.orderByColumn optional 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.
input.sort optional Sort
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.
input.filterSql optional 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.input.first optional Int
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
input.after optional String
The cursor to use when paging forward.
input.last optional Int
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
input.before optional String
The cursor to use when paging backward.
Returns
Non-null 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.
Learn more about pagination in GraphQL.
dataGrid.headers non-null array of String
The Data Grid table's headers.
dataGrid.rows non-null array of String
An array of arrays containing the values of the Data Grid table's rows.
dataGrid.query non-null QueryInfo
The Query statistics and metadata.
dataGrid.pageInfo non-null PageInfo
The Data Grid table's page info.
dataGrid.edges non-null array of DataGridEdge
The Data Grid table's edges.
dataGrid.nodes non-null array of DataGridNode
The Data Grid table's nodes.
describeSqlV1
Describe SQL statements Data Pools.
Arguments
input required DescribeSqlV1Input
Returns
Non-null DescribeSqlResponse
Response from the describe SQL API.
describeSqlV1.columns non-null array of SqlColumnResponse
The columns that the query would return.
leaderboard
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
input required 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.
input.metric optional 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.
input.timeRange optional TimeRangeInput
The time range for calculating the leaderboard.
input.timeZone optional 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".
input.dimensions required array of DimensionInput
One or many Dimensions to group the Metric values by. Typically, Dimensions in a leaderboard are what you want to compare and rank.
input.sort optional Sort
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.
input.rowLimit required Int
The number of rows to be returned. It can be a number between 1 and 1,000.
input.filterSql optional 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.
Returns
Nullable 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.
leaderboard.headers non-null array of String
The table headers. It contains the Dimension and Metric names.
leaderboard.rows non-null array of String
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.
leaderboard.query non-null QueryInfo
The Query statistics and metadata.
metricReport
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
input required 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.
input.timeRange optional TimeRangeInput
The time range for calculating the Metric Report.
input.timeZone optional 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".
input.dimensions required array of MetricReportDimensionInput
One or many dimensions to group the Metric values by. Typically, dimensions in a report are what you want to compare and rank.
input.metrics required array of MetricReportMetricInput
One or more Metrics to include in the Metric Report. These will be broken down by
dimensions
.input.filterSql optional String
The Query Filters to apply when building the Metric Report, in the form of SQL. These can be used to filter out rows.
input.orderByColumn optional 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.input.first optional Int
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
input.after optional String
The cursor to use when paging forward.
input.last optional Int
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
input.before optional String
The cursor to use when paging backward.
Returns
Nullable 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.
Learn more about pagination in GraphQL.
metricReport.pageInfo non-null PageInfo
The report connection's page info.
metricReport.edges non-null array of MetricReportEdge
The report connection's edges.
metricReport.nodes non-null array of MetricReportNode
The report connection's nodes.
metricReport.headers non-null array of String
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.
metricReport.rows non-null array of String
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.
metricReport.query non-null QueryInfo
The Query statistics and metadata.
recordsByUniqueId
This query returns records by the given unique IDs.
Arguments
input required RecordsByUniqueIdInput
The fields for querying records by unique ID.
Returns
Non-null RecordsByUniqueIdResponse
recordsByUniqueId.columns non-null array of String
The Data Pool columns for the record.
recordsByUniqueId.values non-null array of String
An array of values for the record.
recordsByUniqueId.query non-null QueryInfo
The Query statistics and metadata.
sqlV1
Query Data Pools using SQL.
Arguments
input required SqlV1Input
Returns
Non-null SqlResponse
Response from the SQL API.
sqlV1.columns non-null array of SqlColumnResponse
The column names in the same order as present in the
data
field.sqlV1.rows non-null array of String
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.
sqlV1.info non-null QueryInfo
The Query statistics and metadata.
timeSeries
Query a metric in time series format. Returns arrays of timestamps and metric values for the given time range and filters.
Arguments
input required 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.
input.metric optional MetricInput
The Metric to Query. It can be a pre-created one or it can be inlined here.
input.timeRange optional TimeRangeInput
The time range for calculating the time series.
input.timeZone optional 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".
input.granularity required TimeSeriesGranularity
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.
input.filterSql optional 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.
input.groupBy optional array of String
Columns to group by.
Returns
Nullable 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.
timeSeries.labels non-null array of String
The time series labels.
timeSeries.values non-null array of String
The time series values.
timeSeries.groups nullable array of TimeSeriesResponseGroup
The time series values for each group in
groupBy
, if specified.timeSeries.query non-null QueryInfo
The Query statistics and metadata.
topValues
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
input required TopValuesInput
The fields for querying the top values in a given column.
input.dataPool required DataPoolInput
The Data Pool to be queried. A Data Pool ID or unique name can be provided.
input.columnName required String
The column to fetch the unique values from.
input.timeRange optional TimeRangeInput
The time range for calculating the top values.
input.timeZone optional 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".
input.maxValues optional 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.