Links

rasgo.update.metric()

Updates and returns a metric on a dataset

Parameters:

name
type
description
metric_id
int
Rasgo ID of desired metric to update
name
Optional[str]
Name of the new metric
dataset_id
Optional[int]
Rasgo ID for the dataset the metric will be built from
type
Optional[str]
Aggregate function to create the metric, e.g., "average" or "sum"
target_expression
Optional[str]
Column name or expression on which to create the metric
time_grains
Optional[List[str]]
Time level at which to apply the metric, e.g., "DAY" or "WEEK"
time_dimension
Optional[str]
Name of date/time column on which to apply the time_grains
dimensions
Optional[List[str]]
Other dimensional column names used in metric calculation
filters
Optional[List[str]]
Filter expressions to apply to the dataset before calculating metric values
meta
Optional[Dict[str, str]]
Metadata about the metric to store as attributes
label
Optional[str]
For tagging and organization purposes, add labels to your metrics
description
Optional[str]
Explanatory information about your new metric

Returns

Rasgo Metric

Sample usage

Creating a simple metric
updated_metric = rasgo.update.metric(
metric_id=1,
name="changing_a_name",
aggregation_type="average",
time_grains=["YEAR"]
)