-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds sl course link and updates fill_nulls_with and join_to_timespine #4912
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -33,6 +33,7 @@ The specification for conversion metrics is as follows: | |||
| `base_property` | The property from the base semantic model that you want to hold constant. | Entity or Dimension | Optional | | |||
| `conversion_property` | The property from the conversion semantic model that you want to hold constant. | Entity or Dimension | Optional | | |||
| `fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | String | Optional | | |||
| `join_to_timespine` | Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to the parameters table
@@ -21,6 +21,7 @@ This metric is common for calculating things like weekly active users, or month- | |||
| `window` | The accumulation window, such as 1 month, 7 days, 1 year. This can't be used with `grain_to_date`. | Optional | | |||
| `grain_to_date` | Sets the accumulation grain, such as month will accumulate data for one month. Then restart at the beginning of the next. This can't be used with `window`. | Optional | | |||
| `fill_nulls_with` | Set the value in your metric definition instead of null (such as zero).| Optional | | |||
| `join_to_timespine` | Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to the parameters table
| `offset_window` | Set the period for the offset window, such as 1 month. This will return the value of the metric one month from the metric time. | Optional | | ||
| `join_to_timespine` | Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i have added to the parameters table? sounds like it's not supported right?
- distinct_users | ||
# Omitting window will accumulate the measure over all time | ||
window: 7 days | ||
measure: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to measure
not measures
@@ -21,7 +21,7 @@ Ratio allows you to create a ratio between two metrics. You simply specify a num | |||
| `denominator` | The name of the metric used for the denominator, or structure of properties. | Required | | |||
| `filter` | Optional filter for the numerator or denominator. | Optional | | |||
| `alias` | Optional alias for the numerator or denominator. | Optional | | |||
| `fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | Optional | | |||
| `join_to_timespine` | Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to the parameters table - but should i remove?
website/docs/docs/build/simple.md
Outdated
@@ -20,10 +20,10 @@ Simple metrics are metrics that directly reference a single measure, without any | |||
| `type_params` | The type parameters of the metric. | Required | | |||
| `measure` | The measure you're referencing. | Required | | |||
| `fill_nulls_with` | Set the value in your metric definition instead of null (such as zero). | Optional | | |||
| `join_to_timespine` | Boolean that indicates if the aggregated measure should be joined to the time spine table to fill in missing dates. Default `false`. | Optional | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to the parameters table
cc @MichelleBaird-DBT - this pr adds the course video links to the SL docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found two places where the metric spec is incorrect. After those are fixed this should be good to go!
@@ -93,7 +103,7 @@ Next, define a conversion metric as follows: | |||
type: conversion | |||
label: Visit to Buy Conversion Rate (7-day window) | |||
type_params: | |||
fills_nulls_with: 0 | |||
fill_nulls_with: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the nesting doesn't match the example so updated to this:
- name: visit_to_buy_conversion_rate_7d
description: "Conversion rate from visiting to transaction in 7 days"
type: conversion
label: Visit to Buy Conversion Rate (7-day window)
type_params:
conversion_type_params:
base_measure: visits
name: visits
fill_nulls_with: 0
conversion_measure: sellers
name: sellers
entity: user
window: 7 days
previously, it was this:
- name: visit_to_buy_conversion_rate_7d
description: "Conversion rate from visiting to transaction in 7 days"
type: conversion
label: Visit to Buy Conversion Rate (7-day window)
type_params:
fill_nulls_with: 0
conversion_type_params:
base_measure: visits
conversion_measure: sellers
entity: user
window: 7 days
This PR does the following:
this PR also turns the about metricflow faqs into
detailsToggle
component.