Skip to main content

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.propeller optional Propeller

      Optionally specifies the Propeller to use. Applications may not set this value. Instead, Application Queries always use the Propeller configured on the Application.

      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.

      Learn more about Data Sources.

      • P1_X_SMALL

        Max records per second: 5,000,000 records per second

      • P1_SMALL

        Max records per second: 25,000,000 records per second

      • P1_MEDIUM

        Max records per second: 100,000,000 records per second

      • P1_LARGE

        Max records per second: 250,000,000 records per second

      • P1_X_LARGE

        Max records per second: 500,000,000 records per second

    • input.timeRange required TimeRangeInput

      The time range for calculating the Metric Report.

    • 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.filters optional array of FilterInput

      The Query Filters to apply when building the Metric Report. 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.