aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/collateral/__main__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/collateral/__main__.py b/python/collateral/__main__.py
index 5f7311da..11fa69f1 100644
--- a/python/collateral/__main__.py
+++ b/python/collateral/__main__.py
@@ -115,8 +115,8 @@ df["fund"] = df.fund.map(fund_mapping)
df = df[["date", "broker", "strategy", "Amount", "Currency", "fund"]]
sql_str = (
"INSERT INTO strategy_im VALUES(%s, %s, %s, %s, %s, %s) "
- "ON CONFLICT (date, strategy, broker, fund) DO UPDATE "
- "SET currency=EXCLUDED.currency, amount=EXCLUDED.amount"
+ "ON CONFLICT (date, fund, broker, strategy, currency) DO UPDATE "
+ "SET amount=EXCLUDED.amount"
)
with dawn_engine.connect() as conn:
conn.execute(sql_str, list(df.itertuples(index=False)))