{% macro generate_surrogate_wid_date_key(column_name) %} Concat( year({{ column_name }}), Right( Concat(0, month({{ column_name }}) ),2 ), Right( Concat(0, day({{ column_name }}) ),2 ) ) {% endmacro %}
Scripts, Articles, Relevant for DBAs, Consultants, BI, Data Scientists and Developers
{% macro generate_surrogate_wid_date_key(column_name) %} Concat( year({{ column_name }}), Right( Concat(0, month({{ column_name }}) ),2 ), Right( Concat(0, day({{ column_name }}) ),2 ) ) {% endmacro %}