That means something still not correct. Try to print required values such as SEQ, BKG_KEY and CONTACT_TXT
Original Message:
Sent: Wed February 22, 2023 12:08 AM
From: rajesh guttikonda
Subject: lua script issue with has lookup for MS SQL OPTIM dir
Hey Tulasi,
Thanks for your inputs. i am able to resolve all the errors now. but now found a new issue.
even though my Source value BKG_KEY value is different for each record, my output masked value is same. not sure why hash lookup is not working.
t1 = 'PRO=HASH_LOOKUP,HASHFLD=SEQ,'
t1 = t1 .. 'SOURCE="BKG_KEY",'
t1 = t1 .. 'DEST="CONTACT_TXT",'
t1 = t1 .. 'REPLACE="FIRSTNAME",'
t1 = t1 .. 'id="OPTIM_SAMPLE.OPTIM_US_PERSON",lib=MSSQL,conn=OPTIMDIR,'
t1 = t1 .. 'user=OPTIMUSER,pass=OptimPassword1,'
t1 = t1 .. 'FLDDEF1=(NAME=BKG_KEY,DT=INTEGER),'
t1 = t1 .. 'FLDDEF2=(NAME=CONTACT_TXT,DT=WVARCHAR_SZ)'
FNAME=optim.mask(BKG_KEY,CON_VAL,t1)
------------------------------
rajesh guttikonda
Original Message:
Sent: Tue February 21, 2023 11:54 PM
From: Tulasi Das Uppu
Subject: lua script issue with has lookup for MS SQL OPTIM dir
Hi Rajesh,
Can you include latest LUA script and complete error message?
------------------------------
Tulasi Das Uppu
Original Message:
Sent: Tue February 21, 2023 10:57 AM
From: rajesh guttikonda
Subject: lua script issue with has lookup for MS SQL OPTIM dir
Hey Thulasi i made a good progress. now facing issue at the final step.
Optim mask is unable to identify the lookup table and lookup column. no matter which ever lookup table or lookup column i give having the same error.
IOQDP0306E: Replacement field FIRSTNAME not found in the supplied list of fields |
Even if i give wrong lookup names i am receiving the same error.
------------------------------
rajesh guttikonda
Original Message:
Sent: Tue February 21, 2023 02:00 AM
From: Tulasi Das Uppu
Subject: lua script issue with has lookup for MS SQL OPTIM dir
Hi Rajesh,
This kind of problem should be something to do with the LUA script. You may have to start with simple script, test and do incremental changes followed by testing. This should fix your problem.
------------------------------
Thanks,
Tulasi
Original Message:
Sent: Sun February 19, 2023 09:43 PM
From: rajesh guttikonda
Subject: lua script issue with has lookup for MS SQL OPTIM dir
Hello All,
I am receiving error for LUA script while running HASH lookup.
Optim Directory - MSSQL , OPTIM_SAMPLE.OPTIM_US_PERSON
Lookup table - SEQ, FULLNAME
Source Table - BKG_KEY , CONTACT_TXT(need to be masked) , CONTACT_TYP (used for if condition)
error for Hash lookup:
User DLL or Proc requested termination while processing GCP_PRD.DB2INST1.BKG_CONTACT Column Map Procedure set on column CONTACT_TXT encountered an error at line 13 while processing row 1: optimmask: Parser_Service: ODPP Parser: IOQDP3060E: The mandatory parameter FLDDEF was not found " |
|
function cm_transform()
oldvalue=optim.source.getcolumnvalue("CONTACT_TXT")
--print(optim.source.getcolumntype("CONTACT_TXT"))
t1 = 'PRO=HASH_LOOKUP,HASHFLD=SEQ,'
t1 = t1 .. 'SOURCE="CONTACT_TXT",'
t1 = t1 .. 'DEST="CONTACT_TXT",'
t1 = t1 .. 'REPLACE="FULLNAME",'
t1 = t1 .. 'id="OPTIM_SAMPLE.OPTIM_US_PERSON",lib=MSSQL,conn=OPTIMDIR,'
t1 = t1 .. 'user=OPTIMUSER,pass=OptimPassword1,'
t1 = t1 .. 'FLDDEF1=(NAME=CONTACT_TXT,DT=MBVARCHAR)'
newvalue = ''
optim.print("tparm:" .. t1)
newvalue=optim.mask(oldvalue,t1)
optim.print(newvalue)
optim.target.setcolumnvalue(newvalue)
end
Any help will be appreciated.
------------------------------
rajesh guttikonda
------------------------------