Author |
Message
|
GeneRK4 |
Posted: Mon Jul 08, 2013 11:14 pm Post subject: Default value in DFDL |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
My requirement is if I get Null value in Input csv,then the default value should be taken as "A". I am not able to produce this in DFDL.I suppose ,the Null property of DFDL is not letting the DFDL default property to override.
Nillable : true
Nill Kind :literalValue
Nil Value:%ES;
Use Nil for Default :no
Default value : A
Can someone let me know whether I am missing something or is it default nature of current DFDL? |
|
Back to top |
|
 |
shanson |
Posted: Tue Jul 09, 2013 12:47 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
It sounds like your requirement is that an empty CSV column should result in a default value being applied. That is supported by DFDL 1.0, but IBM DFDL has not yet implemented that function.
Note that when IBM DFDL does implement this, you will need to remove %ES; from the list of nil values, as nil processing takes precedence over default processing. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Tue Jul 09, 2013 12:56 am Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
|
Back to top |
|
 |
EricCox |
Posted: Mon May 19, 2014 12:57 pm Post subject: DFDL default values not working |
|
|
Master
Joined: 08 Apr 2011 Posts: 292
|
We are also trying to put in default values to the Fixed length file coming out of DFDL.
We have WMB8.0.0.2 and our understanding was that the default values issue was fixed, is it true?
We are looking at using the mapping node's custom ESQL actions as a work around. If we use this, could you please tell us how do we do it. |
|
Back to top |
|
 |
shanson |
Posted: Tue May 20, 2014 1:04 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
DFDL 1.0 has provision for applying default values when parsing and when serializing. The trigger when parsing is that an element has the 'empty representation'. The trigger when serializing is that an element is missing from the infoset.
IBM DFDL implements default values when serializing, but not yet when parsing.
Note there is one 'hole' in the support for default values when serializing - a default value is not applied when the missing element is a member of a xs:choice. the DFDL 1.0 spec has an algorithm for how to apply a default value in this circumstance, and it's not yet implemented - you will get an error message instead. |
|
Back to top |
|
 |
shanson |
Posted: Thu Jun 02, 2016 2:15 pm Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
As of 10.0.0.3 (I think) the hole mentioned above has been partly fixed. When default values are applied to a missing complex element during serialization and the element is a choice, the first choice branch is used to supply default values. However if an error occurs on the first branch then serialization fails, instead of looking at further branches for default values. |
|
Back to top |
|
 |
|