def load(cusid, tech, date): _g = DSColumn.gen_all_columns(cusid, tech, date, _cat, __name__) c = dict([ ((owner, tblname), columns) for owner, tblname, columns in _g ]) _DDL_proc = get_DDL_proc(c) _SQL_gen_proc = get_SQL_gen_proc(c) for CAT in [PCOFNSRAW, PCOFNGRAW, IMSCSFRAW, IMSHSSRAW, MADNHRRAW, MADODCRAW, IMSDRARAW, XMLNSSRAW, NOKOBWRAW, NOKOMWRAW, NOKIUMRAW]: Common.load(_DDL_proc, _SQL_gen_proc, date, cusid, tech, CAT, __name__)
def load(cusid, tech, date): _g = DSColumn.gen_all_columns(cusid, tech, date, _cat, __name__) c = dict([ ((owner, tblname), columns) for owner, tblname, columns in _g ]) for k in c: print(k) for k1 in c[k]: print(k1, c[k][k1]) _DDL_proc = get_DDL_proc(c, date) _SQL_gen_proc = get_SQL_gen_proc(c, date) Common.load(_DDL_proc, _SQL_gen_proc, date, cusid, tech, _cat, __name__)
def load_latest(cusid, tech, date): _g = DSColumn.gen_all_columns(cusid, tech, date, _cat, __name__) c = dict([((owner, tblname), columns) for owner, tblname, columns in _g]) _DDL_proc = get_truncate_latest_proc(date) _SQL_gen_proc = get_copy_latest_proc(date) Common.load(_DDL_proc, _SQL_gen_proc, date, cusid, tech, _cat, __name__)