Forum Discussion

KH1's avatar
KH1
New Contributor III
10 months ago

Data Sources v Transformation Rules - mapping blanks

G'day ONE members,

There are blanks for some rows in certain Dimensions in our source data files.
1. In DS w/o using a Logical Operator, pls share how to map those blanks to new values, and/or
2. In TR, please share how to map those blanks to new values.

Thank you.

  • I had another thought about this. You can create a List type map with the source value of ; (semicolon). That seems to pick up blank source records. I haven't tested it fully but it seems to work.

  • I use the Leading Fill Value setting in the data source to add a value to blanks. This will only add to the value if there are less characters in the dimension than there are in the leading fill value.

    For example, if your leading fill value is set to ### and the file has a value of "x" the data source value would show "##x" or if the file has a blank value, it would show "###"

  • tuhler's avatar
    tuhler
    New Contributor III

    I use the Leading Fill Value setting in the data source to add a value to blanks. This will only add to the value if there are less characters in the dimension than there are in the leading fill value.

    For example, if your leading fill value is set to ### and the file has a value of "x" the data source value would show "##x" or if the file has a blank value, it would show "###"

    • KH1's avatar
      KH1
      New Contributor III

      G'day tuhler,
      Your brilliant advice works - we owe you.:steaming_bowl:
      How did you figure it out?
      TY. 👍

  • MarcusH's avatar
    MarcusH
    Contributor III

    1. Without using a Logical Operator you can stack the dimensions e.g. for UD3 you can have 2 dimension sources. The first item is fixed text (eg UD3_) and the second item is the actual value in the source. Any records without a source UD3 member will then appear as UD3_. The downside is you have to add UD3_ to the start of all your maps.
    2. Without using a Logical Expression or BR the only option you have is to use a mask with the source *. This is the last map that is executed and will pick up any source records which have a blank source. The downside is that it will also pick up source records which do have a value but do not yet have a map.

    IMHO the best way is a Logical Operator that evaluates the source as it comes in. I suspect you already know that.

    • MarcusH's avatar
      MarcusH
      Contributor III

      I had another thought about this. You can create a List type map with the source value of ; (semicolon). That seems to pick up blank source records. I haven't tested it fully but it seems to work.