Skip to content
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

Merged
merged 44 commits into from
Feb 21, 2024

Conversation

mirnawong1
Copy link
Contributor

This PR does the following:

  • adds links to the newly launched SL video courses in various places for visual learning
  • Updates info related to fill_nulls_width and join_to_timespine in various pages: simple and cumulative metrics page. adds join_to_timespine to all metrics pages, and removes fill_nulls_with in ration and derived metrics page. (see linear for more details)

this PR also turns the about metricflow faqs into detailsToggle component.

@mirnawong1 mirnawong1 requested a review from a team as a code owner February 14, 2024 11:54
Copy link

vercel bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 5:09pm

@github-actions github-actions bot added content Improvements or additions to content guides Knowledge best suited for Guides Docs team Authored by the Docs team @dbt Labs size: medium This change will take up to a week to address labels Feb 14, 2024
@@ -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 |
Copy link
Contributor Author

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 |
Copy link
Contributor Author

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 |
Copy link
Contributor Author

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:
Copy link
Contributor Author

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 |
Copy link
Contributor Author

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?

@@ -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 |
Copy link
Contributor Author

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

@mirnawong1
Copy link
Contributor Author

cc @MichelleBaird-DBT - this pr adds the course video links to the SL docs

Copy link
Contributor

@Jstein77 Jstein77 left a 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
Copy link
Contributor Author

@mirnawong1 mirnawong1 Feb 21, 2024

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

@mirnawong1 mirnawong1 merged commit 23c8c87 into current Feb 21, 2024
7 checks passed
@mirnawong1 mirnawong1 deleted the add-sl-course-update-fills_nulls_width branch February 21, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto update content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs February-2024 guides Knowledge best suited for Guides size: large This change will more than a week to address and might require more than one person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants