diff options
| -rw-r--r-- | python/mtm_status.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/mtm_status.py b/python/mtm_status.py index b6448388..96422784 100644 --- a/python/mtm_status.py +++ b/python/mtm_status.py @@ -23,7 +23,10 @@ def run(conn, date): df = df[(df["SwapType"].isin(["NEW", "ASGM", "TERM"])) & (df["Executed"])] place_holders = ",".join(["%s"] * 7) - sql_str = f"INSERT INTO mtm_submissions VALUES({place_holders})" + sql_str = ( + f"INSERT INTO mtm_submissions VALUES({place_holders}) " + "ON CONFLICT (ticketid, dealid) DO NOTHING" + ) with conn.cursor() as c: for row in df.itertuples(): cpty_id = row.BrokerSecRef |
