Hi,
I have an excel source. I want to convert all blank column in the row to be NULL before inserting it to the table.
I am using this expression in derived column to check if the length = 0, then set it as NULL. Else, use the value given.
LEN(TRIM(HD)) == 0 ? NULL(DT_BOOL) : (DT_BOOL)HD
I'm hitting this error:
Error at Load Channel Mapping xls to staging_temp_Channel [converted data type [2]]: Computing the expression "LEN(TRIM(HD)) == 0 ? "NULL" : (DT_BOOL)HD" failed with error code 0xC00470C5. The expression may have errors, such as divide by zero, that cannot be detected at parse time, or there may be an out-of-memory error.Error at Load Channel Mapping xls to staging_temp_Channel [converted data type [2]]: The expression "LEN(TRIM(HD)) == 0 ? "NULL" : (DT_BOOL)HD" on "converted data type.Outputs[Derived Column Output].Columns[cnvHD]" is not valid.
Error at Load Channel Mapping xls to staging_temp_Channel [converted data type [2]]: Failed to set property "Expression" on "converted data type.Outputs[Derived Column Output].Columns[cnvHD]".
cherriesh