Metric Plot
Parameters
Name
Type
Description
Is Optional
Example
ds = rasgo.get.dataset(id)
ds2 = ds.metric_plot(
metrics=[
{
"name": "Total_Sales"
"type": "SUM",
"source_table": "RASGO.PUBLIC.SALES",
"target_expression": "TOTALSALES",
"time_dimension": "BILLING_DATE",
"time_grains": ["WEEK","MONTH","QUARTER","YEAR"],
"secondary_calculation": {
"type": "period_over_period",
"comparison_strategy": "ratio",
"interval": 7
}
}
],
group_by_dimensions=["BUSINESS_SEGMENT"],
timeseries_options={
"start_date": "2021-12-01",
"end_date": "2022-07-01",
"time_grain": "day"
},
filters=[
{
"column_name": "BILLING_REGION",
"operator": "="
"comparison_value": "SOUTHWEST",
}
]
)
ds2.preview()Source Code
Last updated