aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/load_intex_collateral.py5
-rw-r--r--sql/et_tables.sql2
2 files changed, 5 insertions, 2 deletions
diff --git a/python/load_intex_collateral.py b/python/load_intex_collateral.py
index 6008c3bf..56278949 100644
--- a/python/load_intex_collateral.py
+++ b/python/load_intex_collateral.py
@@ -13,7 +13,8 @@ fields = ['Asset Name', 'Issuer', 'Contributed Balance', 'Asset Maturity Date',
'Frequency', 'Next Paydate', 'Second Lien', 'LoanX ID', 'CUSIP',
'Market Price', 'Market Price Source', 'Market Price Date', 'Fixed or Float', \
'Defaulted Flag', 'Security Sub-Category', 'Structured Finance Security', \
- 'Life Floor', 'Reinvest Collat', 'Native Currency']
+ 'Life Floor', 'Reinvest Collat', 'Native Currency', "Moody's Industry Name",
+ "Country"]
def convertToNone(s):
return None if s=='' else s
@@ -121,7 +122,7 @@ def upload_data(conn, dealnames, workdate):
"Spread", "Frequency", "NextPaydate", "SecondLien", "LoanXID",
"Cusip", "IntexPrice", "IntexPriceSource", "IntexPriceDate",
"FixedOrFloat", "DefaultedFlag", "CovLite", "isCDO",
- "Liborfloor", "ReinvFlag", "Currency"]
+ "Liborfloor", "ReinvFlag", "Currency", "Industry", "Country"]
sqlstr = "INSERT INTO ET_COLLATERAL({0}) VALUES({1})".format(",".join(sql_fields),
",".join(["%s"] * len(sql_fields)))
with conn.cursor() as c:
diff --git a/sql/et_tables.sql b/sql/et_tables.sql
index 1ab55c3f..362123c9 100644
--- a/sql/et_tables.sql
+++ b/sql/et_tables.sql
@@ -31,6 +31,8 @@ CREATE TABLE et_collateral (
Liborfloor float,
ReinvFlag boolean,
Currency varchar(3),
+ Industry text,
+ Country text,
PRIMARY KEY (updatedate, Name, dealname)
);