init
This commit is contained in:
8
dbt/macros/data_transform/clean_boolean_fxcd.sql
Normal file
8
dbt/macros/data_transform/clean_boolean_fxcd.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user