dbt-labs / dbt-semantic-interfaces

The shared semantic layer definitions that dbt-core and MetricFlow use.
Apache License 2.0
71 stars 14 forks source link

[Feature] Add spec changes for conversion metrics #210

Closed WilliamDee closed 11 months ago

WilliamDee commented 11 months ago

Is this your first time submitting a feature request?

Describe the feature

The following will encompass the spec changes for conversion metrics.

metric:
  ...
  type_params:
    conversion_type_params:
      entity: _entity_ # required
      calculation: _calculation_type_ # optional. default: conversion_rate. options: conversions(buys) or conversion_rate (buys/visits) + more to come
      base_measure: _measure_ # required
      conversion_measure: _measure_ # required
      window: _time_window_ # optional. default: inf. window to join the two events on. Follows similar format as time windows elsewhere (i.e. 7 days)
      constant_properties: # optional. List of constant properties default: None
        - base_property: _string_ # required. A reference to a dimension/entity of the semantic model linked to the base_measure
          conversion_property: _string_ # same as base above, but to the semantic model of the conversion_measure

Describe alternatives you've considered

No response

Who will this benefit?

Enables the SL to build conversion metrics

Are you interested in contributing this feature?

No response

Anything else?

No response

Jstein77 commented 11 months ago

@QMalcolm taking our new process for a spin. Will and I confirmed this spec change, and it's ready to go into DSI. I added a Spec Change Approved label to verify that a MF PM has validated the spec changes.

QMalcolm commented 11 months ago

Added via #209