Files
mars-elt/dbt/macros/dbt_overrides/oracle__snapshot_hash_arguments.sql
Grzegorz Michalski 2c225d68ac init
2026-03-02 09:47:35 +01:00

9 lines
382 B
SQL

{% macro oracle__snapshot_hash_arguments(args) -%}
{# Oracle-specific implementation with NULL-safe SCD_ID generation #}
LOWER(RAWTOHEX(STANDARD_HASH(
{%- for arg in args -%}
coalesce(cast({{ arg }} as varchar(4000)), '__DBT_NULL__')
{%- if not loop.last %} || '|' || {%- endif -%}
{%- endfor -%}
, 'SHA256')))
{%- endmacro %}