InfoSphere Optim

 View Only
Expand all | Collapse all

Lua proc to mask or not mask column based on join to other table column?

  • 1.  Lua proc to mask or not mask column based on join to other table column?

    Posted Fri June 14, 2024 01:35 PM

    We have a column in a table that was being masked via a LUA script because it held a member in it.  We have just found that the column can contain a member or a group.  We want to mask a member, but we do not want to mask a group.  The problem is that the only way to tell if it is a group in the column is a SQL join to another table.

    We would prefer to be able to update our current LUA script to handle this special case, but I am not sure if or how you can run a SQL to check if it is a group for each row.  

    Any ideas of what would be the best way to go about this special handling for the masking of this column?  I am not sure how to proceed on this one.

    Thanks,

    Mike Cook



    ------------------------------
    Michael Cook
    ------------------------------



  • 2.  RE: Lua proc to mask or not mask column based on join to other table column?

    Posted Mon June 17, 2024 09:11 AM

    Hi Mike,

    Are you able to extract the data in two phases using a relationship or join query during the extract?  Phase 1 extracts the records with the group and phase 2 extracts the records with the members. Then, just perform the masking on the phase 2 extract. Finally, you can insert both phases to the destination table.
    This would likely be your best performance option. 
    Tammy


    ------------------------------
    ----------------------------------------------
    Tammy Ziegler
    tziegler@abmartin.com
    ------------------------------



  • 3.  RE: Lua proc to mask or not mask column based on join to other table column?

    Posted Mon June 17, 2024 01:42 PM

    Hello Tammy,

    After posting this question, I thought about it more over the weekend and came to the same conclusion that you provided.  Thanks for your response.  It helped to validate that I was on the right track.

    I've tested out my SQL Criteria to get the Group or Non-Group rows in a test extract and that works.   Therefore, we should be able to keep the current process, but just modify it to be the Non-Group rows process by using the SQL Criteria for Non-Group rows.  Then, we can create a parallel process that does the extract, convert, and insert of the Group rows by using the SQL Criteria for Group rows.

    Thanks,

    Mike Cook



    ------------------------------
    Michael Cook
    ------------------------------