Skip to main content

metric

This query returns the Metric specified by the given ID.

A Metric is a business indicator measured over time.

arguments

  • id required ID


returns nullable Metric

The Metric object.

A Metric is a business indicator measured over time.

Learn more about Metrics.

  • id non-null ID

    The Metric's unique identifier.

  • uniqueName non-null String

    The Metric's unique name.

  • description non-null String

    The Metric's description.

  • account non-null Account

    The Metric's Account.

    The Account object.

    • account.id non-null ID

      The Account's unique identifier.

  • environment non-null Environment

    The Metric's Environment.

    The Environments object.

    Environments are independent and isolated Propel workspaces for development, staging (testing), and production workloads. Environments are hosted in a specific region, initially in us-east-2 only.

    • environment.id non-null ID

      The Environment's unique identifier.

  • createdAt non-null DateTime

    The Metric's creation date and time in UTC.

  • modifiedAt non-null DateTime

    The Metric's last modification date and time in UTC.

  • createdBy non-null String

    The Metric's creator. It can be either a User ID, an Application ID, or "system" if it was created by Propel.

  • modifiedBy non-null String

    The Metric's last modifier. It can be either a User ID, an Application ID, or "system" if it was modified by Propel.

  • dataPool nullable DataPool

    The Data Pool that powers this Metric.

    The Data Pool object.

    A Data Pool is a cached table hydrated from your data warehouse optimized for high-concurrency and low-latency queries.

    Learn more about Data Pools.

    • dataPool.id non-null ID

      The Data Pool's unique identifier.

    • dataPool.uniqueName non-null String

      The Data Pool's unique name.

    • dataPool.description non-null String

      The Data Pool's description.

    • dataPool.account non-null Account

      The Data Pool's Account.

    • dataPool.environment non-null Environment

      The Data Pool's Environment.

    • dataPool.createdAt non-null DateTime

      The Data Pool's creation date and time in UTC.

    • dataPool.modifiedAt non-null DateTime

      The Data Pool's last modification date and time in UTC.

    • dataPool.createdBy non-null String

      The Data Pools's creator. It can be either a User ID, an Application ID, or "system" if it was created by Propel.

    • dataPool.modifiedBy non-null String

      The Data Pools's last modifier. It can be either a User ID, an Application ID, or "system" if it was modified by Propel.

    • dataPool.dataSource non-null DataSource

      The Data Pool's Data Source.

    • dataPool.status non-null DataPoolStatus

      The Data Pool's status.

      The status of a Data Pool.

      • CREATED

        The Data Pool has been created and will be set up soon.

      • PENDING

        Propel is attempting to set up the Data Pool.

      • LIVE

        The Data Pool is set up and serving data. Check its Syncs to monitor data ingestion.

      • SETUP_FAILED

        The Data Pool setup failed. Check its Setup Tasks before re-attempting setup.

      • DELETING

        Propel is deleting the Data Pool and all of its associated data.

    • dataPool.dataRetentionInDays non-null Int

      The Data Pool's data retention in days (not yet supported).

    • dataPool.table non-null String

      The name of the Data Pool's table.

    • dataPool.timestamp non-null Dimension

      The Data Pool's timestamp column.

    • dataPool.tenant nullable Tenant

      The Data Pool's Tenant ID, if configured.

    • dataPool.recordCount nullable String

      The number of records in the Data Pool.

    • dataPool.sizeInTerabytes nullable Float

      The amount of storage in terabytes used by the Data Pool.

    • dataPool.columns nullable ColumnConnection

      A list of columns included in the Data Pool. The specified columns from the underlying table will by synced to the Data Pool.

      This list does not include any excluded columns. You can access those via excludedColumns.

      • dataPool.columns.first optional Int

      • dataPool.columns.after optional String

      • dataPool.columns.last optional Int

      • dataPool.columns.before optional String

    • dataPool.availableMeasures nullable ColumnConnection

      A list of measures (numeric columns) available to Metrics.

      This list does not include any excluded columns.

      • dataPool.availableMeasures.first optional Int

      • dataPool.availableMeasures.after optional String

      • dataPool.availableMeasures.last optional Int

      • dataPool.availableMeasures.before optional String

    • dataPool.setupTasks nullable array of DataPoolSetupTask

      A list of setup tasks performed on the Data Pool during its most recent setup attempt.

    • dataPool.syncing nullable DataPoolSyncStatus

      Indicates whether or not syncing records is enabled for the Data Pool.

      The Data Pool Sync Status. It indicates whether a Data Pool is syncing data or not.

      • ENABLED

        Syncing is enabled for the Data Pool.

      • DISABLING

        Propel is disabling syncing for the Data Pool.

      • DISABLED

        Syncing is disabled for the Data Pool.

      • ENABLING

        Propel is re-enabling syncing for the Data Pool.

    • dataPool.syncs nullable SyncConnection

      • dataPool.syncs.first optional Int

      • dataPool.syncs.after optional String

      • dataPool.syncs.last optional Int

      • dataPool.syncs.before optional String

    • dataPool.metrics nullable MetricConnection

      • dataPool.metrics.first optional Int

      • dataPool.metrics.after optional String

      • dataPool.metrics.last optional Int

      • dataPool.metrics.before optional String

    • dataPool.excludedColumns nullable ColumnConnection

      A list of columns to exclude from the Data Pool. The specified columns from the underlying table will not be synced to the Data Pool.

      • dataPool.excludedColumns.first optional Int

      • dataPool.excludedColumns.after optional String

      • dataPool.excludedColumns.last optional Int

      • dataPool.excludedColumns.before optional String

  • dimensions non-null array of Dimension

    The Metric's Dimensions. These Dimensions are available to Query Filters.

    The Dimension object that represents a column in a table.

    • dimensions.columnName non-null String

      The column name it represents.

    • dimensions.type non-null String

      The column data type.

    • dimensions.isNullable nullable Boolean

      Whether the column is nullable.

    • dimensions.stats nullable DimensionStatistics

      The statistics for the dimension values. Fetching statistics incurs query costs.

  • timestamp non-null Dimension

    The Metric's timestamp. This is the same as its Data Pool's timestamp.

    The Dimension object that represents a column in a table.

    • timestamp.columnName non-null String

      The column name it represents.

    • timestamp.type non-null String

      The column data type.

    • timestamp.isNullable nullable Boolean

      Whether the column is nullable.

    • timestamp.stats nullable DimensionStatistics

      The statistics for the dimension values. Fetching statistics incurs query costs.

  • boosters non-null BoosterConnection

    List the Boosters associated to the Metric.

    • boosters.first optional Int

    • boosters.after optional String

    • boosters.last optional Int

    • boosters.before optional String

    The Booster connection object.

    Learn more about pagination in GraphQL.

    • boosters.pageInfo non-null PageInfo

      The connection's page info.

    • boosters.edges nullable array of BoosterEdge

      The connection's edges.

    • boosters.nodes nullable array of Booster

      The connection's nodes.

  • type non-null MetricType

    The Metric's type. The different Metric types determine how the values are calculated.

    The available Metric types.

    • COUNT

      Counts the number of records that matches the Metric Filters. For time series, it will count the values for each time granularity.

    • SUM

      Sums the values of the specified column for every record that matches the Metric Filters. For time series, it will sum the values for each time granularity.

    • COUNT_DISTINCT

      Counts the number of distinct values in the specified column for every record that matches the Metric Filters. For time series, it will count the distinct values for each time granularity.

    • AVERAGE

      Averages the values of the specified column for every record that matches the Metric Filters. For time series, it will average the values for each time granularity.

    • MIN

      Selects the minimum value of the specified column for every record that matches the Metric Filters. For time series, it will select the minimum value for each time granularity.

    • MAX

      Selects the maximum value of the specified column for every record that matches the Metric Filters. For time series, it will select the maximum value for each time granularity.

  • settings non-null MetricSettings

    The settings for the Metric. The settings are specific to the Metric's type.


  • counter nullable CounterResponse

    The Metric data in counter format. A single metric value for the given time range and filters.

    • counter.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.

      • counter.input.timeRange required TimeRangeInput

        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.

        • counter.input.timeRange.relative optional RelativeTimeRange

          The relative time period.

          The Relative time ranges are based on the current date and time.

          THIS - The current unit of time. For example, if today is June 8, 2022, and THIS_MONTH is selected, then data for June 2022 would be returned.

          PREVIOUS - The previous unit of time. For example, if today is June 8, 2022, and PREVIOUS_MONTH is selected, then data for May 2022 would be returned. It excludes the current unit of time.

          NEXT - The next unit of time. For example, if today is June 8, 2022, and NEXT_MONTH is selected, then data for July 2022 would be returned. It excludes the current unit of time.

          LAST_N - The last n units of time, including the current one. For example, if today is June 8, 2022 and LAST_N_YEARS with n = 3 is selected, then data for 2020, 2021, and 2022 will be returned. It will include the current time period.

          • THIS_HOUR

            Starts at the zeroth minute of the current hour and continues for 60 minutes.

          • TODAY

            Starts at 12:00:00 AM of the current day and continues for 24 hours.

          • THIS_WEEK

            Starts on Monday, 12:00:00 AM of the current week and continues for seven days.

          • THIS_MONTH

            Starts at 12:00:00 AM on the first day of the current month and continues for the duration of the month.

          • THIS_QUARTER

            Starts at 12:00:00 AM on the first day of the current calendar quarter and continues for the duration of the quarter.

          • THIS_YEAR

            Starts on January 1st, 12:00:00 AM of the current year and continues for the duration of the year.

          • PREVIOUS_HOUR

            Starts at the zeroth minute of the previous hour and continues for 60 minutes.

          • YESTERDAY

            Starts at 12:00:00 AM on the day before the today and continues for 24 hours.

          • PREVIOUS_WEEK

            Starts on Monday, 12:00:00 AM, a week before the current week, and continues for seven days.

          • PREVIOUS_MONTH

            Starts at 12:00:00 AM on the first day of the month before the current month and continues for the duration of the month.

          • PREVIOUS_QUARTER

            Starts at 12:00:00 AM on the first day of the calendar quarter before the current quarter and continues for the duration of the quarter.

          • PREVIOUS_YEAR

            Starts on January 1st, 12:00:00 AM, the year before the current year, and continues for the duration of the year.

          • NEXT_HOUR

            Starts at the zeroth minute of the next hour and continues for 60 minutes.

          • TOMORROW

            " Starts at 12:00:00 AM, the day after the current day, and continues for 24 hours.

          • NEXT_WEEK

            Starts on Monday, 12:00:00 AM, the week after the current week, and continues for the duration of the week.

          • NEXT_MONTH

            Starts at 12:00:00 AM on the first day of the next month and continues for the duration of the month.

          • NEXT_QUARTER

            Starts at 12:00:00 AM on the first day of the next calendar quarter and continues for the duration of the quarter.

          • NEXT_YEAR

            Starts on January 1st, 12:00:00 AM of the next year and continues for the duration of the year.

          • LAST_N_MINUTES

            Starts at the zeroth second n - 1 minute(s) before the current minute and continues through the current minute. It includes this minute.

          • LAST_N_HOURS

            Starts at the zeroth minute of the n - 1 hour(s) before the current hour, and continues through the current hour. It includes this hour.

          • LAST_N_DAYS

            Starts at 12:00:00 AM, n - 1 day(s) before the current day, and continues through the current day. It includes today.

          • LAST_N_WEEKS

            Starts on Monday, 12:00:00 AM, n - 1 week(s) before the current week, and continues through the current week. It includes this week.

          • LAST_N_MONTHS

            Starts at 12:00:00 AM on the first day of the month, n - 1 month(s) before the current month, and continues through the current month. It includes this month.

          • LAST_N_QUARTERS

            Starts at 12:00:00 AM on the first day of the calendar quarter n - 1 quarter(s) before the current quarter and continues through the current quarter. It includes this quarter.

          • LAST_N_YEARS

            Starts on January 1st, 12:00:00 AM of the year n - 1 year(s) before the current year and continues through the current year. It includes this year.

        • counter.input.timeRange.n optional Int

          The number of time units for the LAST_N relative periods.

        • counter.input.timeRange.start optional DateTime

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

        • counter.input.timeRange.stop optional DateTime

          The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.

      • counter.input.filters optional array of FilterInput

        The Query Filters to apply before retrieving the counter data. If no Query Filters are provided, all data is included.

        The fields for defining a Filter.

        • counter.input.filters.column required String

          The name of the column to filter on.

        • counter.input.filters.operator required FilterOperator

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

          The available Filter operators.

          • EQUALS

            Selects values that are equal to the specified value.

          • NOT_EQUALS

            Selects values that are not equal to the specified value.

          • GREATER_THAN

            Selects values that are greater than the specified value.

          • GREATER_THAN_OR_EQUAL_TO

            Selects values that are greater or equal to the specified value.

          • LESS_THAN

            Selects values that are less than the specified value.

          • LESS_THAN_OR_EQUAL_TO

            Selects values that are less or equal to the specified value.

        • counter.input.filters.value required String

          The value to compare the column to.

      • counter.input.propeller optional Propeller

        Optionally specifies the Propeller to use. This can be set when querying from the Metric Playground or GraphQL Explorer. Applications may not set this value. Instead, Application Queries always use the Propeller configured on the Application.

        A Propeller defines the compute power assigned to a Propel Application. The larger its compute power, the faster the queries. With Propellers, you can assign different compute powers (and cost profiles) to different use cases or workloads (with the same data).

        Propellers have the following properties:

        Max RPS: The maximum number of records per second (RPS) that can be processed by the Propeller on a single query.

        • 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

    The counter response object. It contains a single Metric value for the given time range and Query Filters.

    • counter.value non-null String

      The value of the counter.

    • counter.query non-null QueryInfo

      The Query statistics and metadata.

  • timeSeries nullable TimeSeriesResponse

    The Metric data in time series format. Arrays of timestamps and Metric values for the given time range and filters.

    • timeSeries.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.

      • timeSeries.input.timeRange required TimeRangeInput

        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.

        • timeSeries.input.timeRange.relative optional RelativeTimeRange

          The relative time period.

          The Relative time ranges are based on the current date and time.

          THIS - The current unit of time. For example, if today is June 8, 2022, and THIS_MONTH is selected, then data for June 2022 would be returned.

          PREVIOUS - The previous unit of time. For example, if today is June 8, 2022, and PREVIOUS_MONTH is selected, then data for May 2022 would be returned. It excludes the current unit of time.

          NEXT - The next unit of time. For example, if today is June 8, 2022, and NEXT_MONTH is selected, then data for July 2022 would be returned. It excludes the current unit of time.

          LAST_N - The last n units of time, including the current one. For example, if today is June 8, 2022 and LAST_N_YEARS with n = 3 is selected, then data for 2020, 2021, and 2022 will be returned. It will include the current time period.

          • THIS_HOUR

            Starts at the zeroth minute of the current hour and continues for 60 minutes.

          • TODAY

            Starts at 12:00:00 AM of the current day and continues for 24 hours.

          • THIS_WEEK

            Starts on Monday, 12:00:00 AM of the current week and continues for seven days.

          • THIS_MONTH

            Starts at 12:00:00 AM on the first day of the current month and continues for the duration of the month.

          • THIS_QUARTER

            Starts at 12:00:00 AM on the first day of the current calendar quarter and continues for the duration of the quarter.

          • THIS_YEAR

            Starts on January 1st, 12:00:00 AM of the current year and continues for the duration of the year.

          • PREVIOUS_HOUR

            Starts at the zeroth minute of the previous hour and continues for 60 minutes.

          • YESTERDAY

            Starts at 12:00:00 AM on the day before the today and continues for 24 hours.

          • PREVIOUS_WEEK

            Starts on Monday, 12:00:00 AM, a week before the current week, and continues for seven days.

          • PREVIOUS_MONTH

            Starts at 12:00:00 AM on the first day of the month before the current month and continues for the duration of the month.

          • PREVIOUS_QUARTER

            Starts at 12:00:00 AM on the first day of the calendar quarter before the current quarter and continues for the duration of the quarter.

          • PREVIOUS_YEAR

            Starts on January 1st, 12:00:00 AM, the year before the current year, and continues for the duration of the year.

          • NEXT_HOUR

            Starts at the zeroth minute of the next hour and continues for 60 minutes.

          • TOMORROW

            " Starts at 12:00:00 AM, the day after the current day, and continues for 24 hours.

          • NEXT_WEEK

            Starts on Monday, 12:00:00 AM, the week after the current week, and continues for the duration of the week.

          • NEXT_MONTH

            Starts at 12:00:00 AM on the first day of the next month and continues for the duration of the month.

          • NEXT_QUARTER

            Starts at 12:00:00 AM on the first day of the next calendar quarter and continues for the duration of the quarter.

          • NEXT_YEAR

            Starts on January 1st, 12:00:00 AM of the next year and continues for the duration of the year.

          • LAST_N_MINUTES

            Starts at the zeroth second n - 1 minute(s) before the current minute and continues through the current minute. It includes this minute.

          • LAST_N_HOURS

            Starts at the zeroth minute of the n - 1 hour(s) before the current hour, and continues through the current hour. It includes this hour.

          • LAST_N_DAYS

            Starts at 12:00:00 AM, n - 1 day(s) before the current day, and continues through the current day. It includes today.

          • LAST_N_WEEKS

            Starts on Monday, 12:00:00 AM, n - 1 week(s) before the current week, and continues through the current week. It includes this week.

          • LAST_N_MONTHS

            Starts at 12:00:00 AM on the first day of the month, n - 1 month(s) before the current month, and continues through the current month. It includes this month.

          • LAST_N_QUARTERS

            Starts at 12:00:00 AM on the first day of the calendar quarter n - 1 quarter(s) before the current quarter and continues through the current quarter. It includes this quarter.

          • LAST_N_YEARS

            Starts on January 1st, 12:00:00 AM of the year n - 1 year(s) before the current year and continues through the current year. It includes this year.

        • timeSeries.input.timeRange.n optional Int

          The number of time units for the LAST_N relative periods.

        • timeSeries.input.timeRange.start optional DateTime

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

        • timeSeries.input.timeRange.stop optional DateTime

          The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.

      • timeSeries.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.

      • timeSeries.input.filters optional array of FilterInput

        The Query Filters to apply before retrieving the time series data. If no Query Filters are provided, all data is included.

        The fields for defining a Filter.

        • timeSeries.input.filters.column required String

          The name of the column to filter on.

        • timeSeries.input.filters.operator required FilterOperator

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

          The available Filter operators.

          • EQUALS

            Selects values that are equal to the specified value.

          • NOT_EQUALS

            Selects values that are not equal to the specified value.

          • GREATER_THAN

            Selects values that are greater than the specified value.

          • GREATER_THAN_OR_EQUAL_TO

            Selects values that are greater or equal to the specified value.

          • LESS_THAN

            Selects values that are less than the specified value.

          • LESS_THAN_OR_EQUAL_TO

            Selects values that are less or equal to the specified value.

        • timeSeries.input.filters.value required String

          The value to compare the column to.

      • timeSeries.input.propeller optional Propeller

        Optionally specifies the Propeller to use. This can be set by Users when querying from the Metric Playground or GraphQL Explorer. Applications may not set this value. Instead, Application Queries always use the Propeller configured on the Application.

        A Propeller defines the compute power assigned to a Propel Application. The larger its compute power, the faster the queries. With Propellers, you can assign different compute powers (and cost profiles) to different use cases or workloads (with the same data).

        Propellers have the following properties:

        Max RPS: The maximum number of records per second (RPS) that can be processed by the Propeller on a single query.

        • 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

    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.query non-null QueryInfo

      The Query statistics and metadata.

  • leaderboard nullable LeaderboardResponse

    The Metric data in leaderboard format. A table (array of rows) with the selected dimensions and corresponding Metric values for the given time range and filters.

    • leaderboard.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.

      • leaderboard.input.timeRange required TimeRangeInput

        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.

        • leaderboard.input.timeRange.relative optional RelativeTimeRange

          The relative time period.

          The Relative time ranges are based on the current date and time.

          THIS - The current unit of time. For example, if today is June 8, 2022, and THIS_MONTH is selected, then data for June 2022 would be returned.

          PREVIOUS - The previous unit of time. For example, if today is June 8, 2022, and PREVIOUS_MONTH is selected, then data for May 2022 would be returned. It excludes the current unit of time.

          NEXT - The next unit of time. For example, if today is June 8, 2022, and NEXT_MONTH is selected, then data for July 2022 would be returned. It excludes the current unit of time.

          LAST_N - The last n units of time, including the current one. For example, if today is June 8, 2022 and LAST_N_YEARS with n = 3 is selected, then data for 2020, 2021, and 2022 will be returned. It will include the current time period.

          • THIS_HOUR

            Starts at the zeroth minute of the current hour and continues for 60 minutes.

          • TODAY

            Starts at 12:00:00 AM of the current day and continues for 24 hours.

          • THIS_WEEK

            Starts on Monday, 12:00:00 AM of the current week and continues for seven days.

          • THIS_MONTH

            Starts at 12:00:00 AM on the first day of the current month and continues for the duration of the month.

          • THIS_QUARTER

            Starts at 12:00:00 AM on the first day of the current calendar quarter and continues for the duration of the quarter.

          • THIS_YEAR

            Starts on January 1st, 12:00:00 AM of the current year and continues for the duration of the year.

          • PREVIOUS_HOUR

            Starts at the zeroth minute of the previous hour and continues for 60 minutes.

          • YESTERDAY

            Starts at 12:00:00 AM on the day before the today and continues for 24 hours.

          • PREVIOUS_WEEK

            Starts on Monday, 12:00:00 AM, a week before the current week, and continues for seven days.

          • PREVIOUS_MONTH

            Starts at 12:00:00 AM on the first day of the month before the current month and continues for the duration of the month.

          • PREVIOUS_QUARTER

            Starts at 12:00:00 AM on the first day of the calendar quarter before the current quarter and continues for the duration of the quarter.

          • PREVIOUS_YEAR

            Starts on January 1st, 12:00:00 AM, the year before the current year, and continues for the duration of the year.

          • NEXT_HOUR

            Starts at the zeroth minute of the next hour and continues for 60 minutes.

          • TOMORROW

            " Starts at 12:00:00 AM, the day after the current day, and continues for 24 hours.

          • NEXT_WEEK

            Starts on Monday, 12:00:00 AM, the week after the current week, and continues for the duration of the week.

          • NEXT_MONTH

            Starts at 12:00:00 AM on the first day of the next month and continues for the duration of the month.

          • NEXT_QUARTER

            Starts at 12:00:00 AM on the first day of the next calendar quarter and continues for the duration of the quarter.

          • NEXT_YEAR

            Starts on January 1st, 12:00:00 AM of the next year and continues for the duration of the year.

          • LAST_N_MINUTES

            Starts at the zeroth second n - 1 minute(s) before the current minute and continues through the current minute. It includes this minute.

          • LAST_N_HOURS

            Starts at the zeroth minute of the n - 1 hour(s) before the current hour, and continues through the current hour. It includes this hour.

          • LAST_N_DAYS

            Starts at 12:00:00 AM, n - 1 day(s) before the current day, and continues through the current day. It includes today.

          • LAST_N_WEEKS

            Starts on Monday, 12:00:00 AM, n - 1 week(s) before the current week, and continues through the current week. It includes this week.

          • LAST_N_MONTHS

            Starts at 12:00:00 AM on the first day of the month, n - 1 month(s) before the current month, and continues through the current month. It includes this month.

          • LAST_N_QUARTERS

            Starts at 12:00:00 AM on the first day of the calendar quarter n - 1 quarter(s) before the current quarter and continues through the current quarter. It includes this quarter.

          • LAST_N_YEARS

            Starts on January 1st, 12:00:00 AM of the year n - 1 year(s) before the current year and continues through the current year. It includes this year.

        • leaderboard.input.timeRange.n optional Int

          The number of time units for the LAST_N relative periods.

        • leaderboard.input.timeRange.start optional DateTime

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

        • leaderboard.input.timeRange.stop optional DateTime

          The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.

      • leaderboard.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.

        The fields for creating or modifying a Dimension.

        • leaderboard.input.dimensions.columnName required String

          The name of the column to create the Dimension from.

      • leaderboard.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 sort order options for Metric Queries.

        • ASC

          Sort in ascending order.

        • DESC

          Sort in descending order.

      • leaderboard.input.rowLimit required Int

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

      • leaderboard.input.filters optional array of FilterInput

        The list of filters to apply before retrieving the leaderboard data. If no Query Filters are provided, all data is included.

        The fields for defining a Filter.

        • leaderboard.input.filters.column required String

          The name of the column to filter on.

        • leaderboard.input.filters.operator required FilterOperator

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

          The available Filter operators.

          • EQUALS

            Selects values that are equal to the specified value.

          • NOT_EQUALS

            Selects values that are not equal to the specified value.

          • GREATER_THAN

            Selects values that are greater than the specified value.

          • GREATER_THAN_OR_EQUAL_TO

            Selects values that are greater or equal to the specified value.

          • LESS_THAN

            Selects values that are less than the specified value.

          • LESS_THAN_OR_EQUAL_TO

            Selects values that are less or equal to the specified value.

        • leaderboard.input.filters.value required String

          The value to compare the column to.

      • leaderboard.input.propeller optional Propeller

        Optionally specifies the Propeller to use. This can be set by Users when querying from the Metric Playground or GraphQL Explorer. Applications may not set this value. Instead, Application Queries always use the Propeller configured on the Application.

        A Propeller defines the compute power assigned to a Propel Application. The larger its compute power, the faster the queries. With Propellers, you can assign different compute powers (and cost profiles) to different use cases or workloads (with the same data).

        Propellers have the following properties:

        Max RPS: The maximum number of records per second (RPS) that can be processed by the Propeller on a single query.

        • 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

    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.

  • policies non-null PolicyConnection

    List the Policies associated to the Metric.

    • policies.first optional Int

    • policies.after optional String

    • policies.last optional Int

    • policies.before optional String

    The Policy connection object.

    Learn more about pagination in GraphQL.

    • policies.pageInfo non-null PageInfo

      The connection's page info.

    • policies.edges nullable array of PolicyEdge

      The connection's edges.

    • policies.nodes nullable array of Policy

      The connection's nodes.

  • accessControlEnabled non-null Boolean

    Whether or not access control is enabled for the Metric.