Metric

Metrics are derived from Table to represent calculated or aggregated fields and columns. Metrics can be an aggregated table, a series of meters or even a single value of meter.

Metrics work as a data source that's ready for reporting and charting. All pages across the app can access metrics data.

Create A Metric

Metrics are always created from Tables. To create a metric in an app, select Data Source -> Table -> Create a Metric or select Data Source -> Metric -> Create Metric -> Select a Table source.

There's three ways to create Metrics:

  1. Generate by AI: Type natural language to generate metrics with AI

  2. Layer: No code GUI to perform summarize, filter, sort and limit to the resource

  3. SQL: Write SQL code that program the metrics logic

Generate by AI

The first and default way to create metrics is Generate By AI. In the metrics pane, you can describe what metrics you want using natural language prompt. Our AI metrics will generate the metrics according to your description and table schema. There are also five suggested prompt suggested to use.

Iterate metric result

Occasionally, the initial metric may not align perfectly with your expectations. In such instances, you have the opportunity to reiterate metric by sharing additional information and your creative insights, allowing AI to modify the metric to your precise requirements. Simply type your requests within the same conversation. Our AI retains knowledge of previous conversations and metric results.

If you are still not satisfied with the result, you can switch to SQL mode and edit the SQL query yourself.

Clear conversation

If you want to start over, you can click Clear conversation. Our AI will then forget the current conversation and begin anew with your new prompt and the original table schema.

Layer

Layer is a remarkable no-code tool that empowers you to weave logic into your original table within several clicks.

It offers support for several fundamental operations:

  1. Summarize: This operation allows you to extract meaningful insights and summaries from your data.

  2. Filter: With the Filter function, you can easily narrow down your data to focus on specific criteria or conditions.

  3. Sort: Use the Sort feature to arrange your data in a structured and organized manner.

  4. Limit: The Limit option lets you restrict your data to a specified range or quantity.

You have the flexibility to combine these operations in various ways, allowing you to adapt your data processing within the app builder to suit your specific requirements.

SQL

You can use the query generated by AI and further edit it in SQL mode, granting you unlimited flexibility. However, if you are a deep SQL expert, Query is designed for you to craft templated queries.

Interactions

The interactions of metrics are completely inherited from the Table

Actions

  • Get Metric Data

    Retrieve table node data with certain page, search and order.

    • Page Size: The number of results to display per page. A higher page size will show more results on a single page, while a lower value will show fewer.

    • Page Number: The specific page (starting from 1) of results to display based on the defined Page Size. For example, if there are 400 rows and the Page Size is set to 100, selecting Page Number 3 will show results 201-300.

    • Search Fields: Specifies the database columns or attributes that should be searched. This helps in narrowing down the search to specific fields rather than searching across all columns.

    • Search Value: The actual text or value to search for within the chosen Search Fields. The database will return results that match or contain this value in the specified fields.

    • Sorting Field: Determines the database column or attribute by which the results should be sorted. For example, if you choose a 'Date' field, the results will be sorted based on dates.

    • Sorting Order: Determines the direction of the sort for the selected Sorting Field. Common values include 'Ascending' (A-Z, smallest to largest, or oldest to newest) and 'Descending' (Z-A, largest to smallest, or newest to oldest).

Events

  • Data Update: Triggered when the data node runs.

  • Data Update Error: Triggered when errors occur as the data node runs.

Use cases for Tables

Last updated