Data Source

Data source actions are used to dynamically fetch data from data sources or update data. There are three kinds of data sources in the app builder: Table, Metric and Query. Each data source supports different actions.

Table

For Tables, there are two supported actions: Get Table Data and Insert Table Rows

Get Table Data

This action retrieve table data from the datasource with search, filter, page and sort. It is used to create a searchable table, apply filters, change pages and implement sorting options to arrange the data in ascending or descending order based on selected columns.

  • Page Size: Specify the number of records or items to display on each page when paginating through data. It determines how many results are visible at a time.

  • Page Number: Enter the current page number when paginating through a large dataset.

  • Search Fields: Specify the fields or columns within the data source that should be included in the search operation. Users can search for information based on the selected fields.

  • Search Value: Enter the value or keyword that users want to search for within the selected search fields. It's the actual query used to retrieve specific data.

  • Sorting Field: Choose the field or column by which you want to sort the data. It determines the order in which data entries are displayed, either in ascending or descending order.

  • Sorting Order: Specify whether you want the sorting to be in ascending (e.g., A-Z) or descending (e.g., Z-A) order based on the selected sorting field.

  • Advanced Filters: This field provides an option for applying more complex and customized filters to the data. It allows users to refine their data queries based on various criteria.

Insert Table Rows

Insert new records to the data source. This action is used to add fresh data entries or records into the designated data source. It is particularly helpful when you need to populate a data source with new information, whether you're collecting user input, importing data from external sources, or simply adding data manually.

Metric

For Metrics, there is only one supported action: Get Metric Data

Get Metric Data

This action retrieve data from the metrics result with search, filter, page and sort. It is used to create a searchable table, apply filters, change pages and implement sorting options to arrange the data in ascending or descending order based on selected columns.

  • Page Size: Specify the number of records or items to display on each page when paginating through data. It determines how many results are visible at a time.

  • Page Number: Enter the current page number when paginating through a large dataset.

  • Search Fields: Specify the fields or columns within the data source that should be included in the search operation. Users can search for information based on the selected fields.

  • Search Value: Enter the value or keyword that users want to search for within the selected search fields. It's the actual query used to retrieve specific data.

  • Sorting Field: Choose the field or column by which you want to sort the data. It determines the order in which data entries are displayed, either in ascending or descending order.

  • Sorting Order: Specify whether you want the sorting to be in ascending (e.g., A-Z) or descending (e.g., Z-A) order based on the selected sorting field.

  • Advanced Filters: This field provides an option for applying more complex and customized filters to the data. It allows users to refine their data queries based on various criteria.

Query

There are two frequent use actions supported for Queries: Set SQL Parameter and Run Query

Set SQL Parameter

This action is crucial for dynamic queries. Set SQL Parameter is used to change the parameter's value and rerun the query with the new parameter value, thereby altering the query result. Set SQL parameter can be very powerful and help accomplish a wide range of tasks.

The field in the Set SQL parameter corresponds to the parameters defined in the selected query. These parameters can have fixed values or dynamic values using accessors.

Public: Check this option if you want the action to be broadcast to all the sessions. If set to false, users won't be affected by other users' actions.

After setting sql parameter successfully, the query result will be updated. You can fetch the results using Chart, Table or Accessors.

For a practical example, refer to Create a filter

Run Query

Rerun Query to update the result. If you want to use the result of the query. Go the the query interaction, add actions after Data Updated event and use `mountData.data` to get query result.

Last updated