Skip to content

Question in Model Kind Documentation #5696

@gtsiatsios

Description

@gtsiatsios

On example Example of SCD Type 2 By Column in Action its mentioned: We configure the SCD Type 2 By Column model to check the columns Name and Price for changes as I checked on the model definition a column should be declared as or composition as unique_key

If the model definition is like the example on the same example above:

MODEL (
  name db.menu_items,
  kind SCD_TYPE_2_BY_COLUMN (
    unique_key id,
    columns [name, price]
  )
);

SELECT
  id::INT,
  name::STRING,
  price::DOUBLE,
FROM
  stg.current_menu_items;

how is possible to have multiple ids for the same [Name,Price] since id is the unique_key?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions