[# Non-Historized Satellite Template #]
[# Generates a satellite model that only keeps the latest record (no history) #]
{{ config(
    materialized='incremental',
    tags=['satellite', 'non_historized', 'raw_vault'[% if group %], '[[ group ]]'[% endif %]]
) }}

{%- set yaml_metadata -%}
source_model: [[ stage_name ]]
parent_hashkey: [[ parent_hashkey ]]
src_payload:
[% for col in columns %]
    - [[ col.target_column_name if col.target_column_name else col.source_column ]]
[% endfor %]
{%- endset -%}

{{ datavault4dbt.nh_sat(yaml_metadata=yaml_metadata) }}
