{% macro clean_boolean_fxcd(column_name) %}
    {# Replaces Informatica UDF: udf_clean_BOOLEAN_FIELD_STR_FXCD #}
    CASE 
        WHEN {{ column_name }} IS NULL THEN NULL
        WHEN UPPER({{ column_name }}) IN ('N', 'NO', '0', ' ') THEN 'N'
        ELSE 'Y'
    END
{% endmacro %}