Home › Forums › kdb+ › Default dictionary value › Re: Default dictionary value
-
Hi,
You can define a dictionary with the default values that you would like to assign and then use the fill operator to assign these values when the key is missing or the value is null.
q)ddef:enlist[`d]!enlist 99 q)d:`a`b`c!("";2;3) q)(ddef^d)`d 99