IA coalesce function result
Posted: Fri Sep 22, 2017 9:24 am
Creating a new Data Rule Definition in IA Workbench with nested functions.
Data types are NULLABLE STRING. I need to perform the equivalent of Trim(NullToEmpty(col)) in a DataStage derivation.
coalesce(column,'') works OK by itself in IA.
trim(street,'') works OK by itself in IA.
trim(coalesce(column,'')) causes some problems in IA:
1. Validate fails with error:
Invalid parameter: One of the parameters passed to the scalar function "trim" does not have the expected type.
2. When I try to save the data rule definition, a "Save Failed" error pops up:
com.ascential.investigate.dr.exception.DataRulesException: Exception when saving rule: trim(coalesce(column,'')) unique ......Exception Cause :null
I found that inserting tostring() validates and saves OK.
trim(tostring(coalesce(column,'')))
Why is tostring() necessary? What is the data type of the coalesce() result? I expect it output to be the empty string.
Data types are NULLABLE STRING. I need to perform the equivalent of Trim(NullToEmpty(col)) in a DataStage derivation.
coalesce(column,'') works OK by itself in IA.
trim(street,'') works OK by itself in IA.
trim(coalesce(column,'')) causes some problems in IA:
1. Validate fails with error:
Invalid parameter: One of the parameters passed to the scalar function "trim" does not have the expected type.
2. When I try to save the data rule definition, a "Save Failed" error pops up:
com.ascential.investigate.dr.exception.DataRulesException: Exception when saving rule: trim(coalesce(column,'')) unique ......Exception Cause :null
I found that inserting tostring() validates and saves OK.
trim(tostring(coalesce(column,'')))
Why is tostring() necessary? What is the data type of the coalesce() result? I expect it output to be the empty string.