MetricsGrid

The MetricsGrid component displays each row of a Python function or SQL file execution result in the Metrics component.

<MetricsGrid 
  alias="aggregate_py" 
  variables={{
    department
  }}
  cols="3"
  valueKey="amount" 
  labelKey="name" 
/>

Properties

alias
string
required

Name of the Python function or SQL file.

varialbes
{ [key: string]: Variable }

Variables to pass to the Python function or SQL file. Declare using the variable() function.

valueKey
string

Column name of the value to display

labelKey
string

Column name of label when you need to get label string from the data

label
string

String displayed above the value

unit
string

String displayed to the right of the value

Metrics

The Metrics component displays the value of a specific column from the first row of the execution result of a Python function or SQL file.

<Metrics 
  alias="aggregate_py"
  variables={{
    department
  }}
  valueKey="amount" 
  unit="USD"
  label="Total Sales"
/>

Properties

alias
string
required

Name of the Python function or SQL file.

varialbes
{ [key: string]: Variable }

Variables to pass to the Python function or SQL file. Declare using the variable() function.

valueKey
string

Column name of the value to display

label
string

String displayed above the value

unit
string

String displayed to the right of the value