FDMEE jython script to delete records for a period
Hello,
I am trying to extract records from source table to FDMEE AIF OPEN INTERFACE table using a custom script. The script runs as expected. However, when it is executed multiple times, the records for the period are inserted into the target table which results in duplicate records.
My requirement is to clear/ delete existing records for the current period and then do the import. Here is the script.
Thanks in advance!
import java.sql as sql
insertStmt = """
INSERT INTO AIF_OPEN_INTERFACE (
BATCH_NAME,
YEAR,
PERIOD,
PERIOD_NUM,
CURRENCY,
AMOUNT,
AMOUNT_YTD,
COL01,
COL02,
COL03,
COL04
) VALUES (
?
,?
,?
,?
,?
,?
,?
,?
,?
,?
,?
)
"""
counter = 0
selectStmt = "SELECT * FROM XXMTN_XLA_TRX_DET@SMTN17TOSMTN2I"