Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2014-02-28T12:38:51Z by smithha
HishamZz
HishamZz
4 Posts
ACCEPTED ANSWER

Pinned topic Issue with in_reference_list function

‏2014-02-21T10:58:11Z |

Hi Guys,

 

Faced with a small predicament for which I am unable to deduce what could be the proper solution.

I have this simple rule :-

source_column in_reference_list reflist

reflist is a placeholder for the reference values which needs to be bound to a data rule at the time of its generation. In other words, the rule definition just has a placeholder for the list of reference values rather than the values themselves. 

 

When generating the data rule from the above rule definition, I bind the column and bind the string value 'A','B','C' to reflist. 

Running the rule however results in 100% mismatch though it should be a 100% match. Looking at the output table, it shows that its trying to compare the value 'A','B','C' with the values in the column and not A, or individually. Any idea what I might be doing wrong here? Would appreciate your response :)

 

Hish

  • RobertDickson
    RobertDickson
    72 Posts
    ACCEPTED ANSWER

    Re: Issue with in_reference_list function

    ‏2014-02-23T21:17:33Z  in response to HishamZz

    I do not think you can bind to the reference data when using in_reference_list.  Try entering 'A','B','C' as the reference data. It will end up showing as {'A','B','C'} in the Data Rule Definition.

    Regards,

    Robert

    • HishamZz
      HishamZz
      4 Posts
      ACCEPTED ANSWER

      Re: Issue with in_reference_list function

      ‏2014-02-24T07:53:29Z  in response to RobertDickson

      Thanks for your reply Robert.

       

      I was actually hoping that the reference data can actually be given at the time of rule generation as when creating the rule data definition it did not throw errors when given a placeholder. 

      If this is not allowed, we would need to have multiple rule definitions for separate data quality rules of similar nature. Is this a limitation of the tool by itself?

       

      Hisham

      • smithha
        smithha
        162 Posts
        ACCEPTED ANSWER

        Re: Issue with in_reference_list function

        ‏2014-02-24T13:41:08Z  in response to HishamZz

        The IN_REFERENCE_LIST evaluates a set of one or more values - the syntax structure for the reference values is { x , y , ... }

        The values can be input as literals or can be a variable.  The following are valid examples:

        field1 IN_REFERENCE_LIST { 'A', 'B', 'C' }

        field1 IN_REFERENCE_LIST { A, B, C }

        In the first case, the values are string literals in the rule definition and are set when the data rule is generated.

        In the second case, the values are variables and can be bound when the data rule is generated.  But you must bind each variable A, B, C  and you must set them to a specific string value. 

        What you can't do is include a single variable A and bind it to a variable number of values.  Whatever you input for a variable is a single string - there is no parsing done. 

        If you really want to bind to a variable set of values, you need to put them in a file or table and use the IN_REFERENCE_COLUMN syntax.

        Harald

        • HishamZz
          HishamZz
          4 Posts
          ACCEPTED ANSWER

          Re: Issue with in_reference_list function

          ‏2014-02-28T09:22:53Z  in response to smithha

          Thanks for your response Robert/Smitha. It was really interesting to understand how exactly IA parses this. It is a pity though that all this is not documented :(

           

          Thanks again!

          Hish

          • smithha
            smithha
            162 Posts
            ACCEPTED ANSWER

            Re: Issue with in_reference_list function

            ‏2014-02-28T12:38:51Z  in response to HishamZz

            I'll pass the note on to the documentation team and see if we can add it there.

            Harald