CREATE TABLE `book_entry_daily_values` ( `id` int(11) NOT NULL COMMENT 'autoincrement=1', `book_entry_id` int(11) NOT NULL, `market_date` date NOT NULL, `trade_date` date NOT NULL, `daycounter` int(11) DEFAULT NULL, `option_price` decimal(12,4) DEFAULT NULL, `imputed_price` decimal(12,4) DEFAULT NULL, `actual_spot` decimal(12,4) DEFAULT NULL, `ask` decimal(12,4) DEFAULT NULL, `bid` decimal(12,4) DEFAULT NULL, `implied_vol` decimal(12,7) DEFAULT NULL, `imputed_div_yield` decimal(9,6) DEFAULT NULL, `imputed_rf_rate` decimal(9,6) DEFAULT NULL, `delta` decimal(12,10) DEFAULT NULL, `anl_delta` decimal(12,10) DEFAULT NULL, `gamma` decimal(12,10) DEFAULT NULL, `anl_gamma` decimal(12,10) DEFAULT NULL, `vega` decimal(12,7) DEFAULT NULL, `anl_vega` decimal(12,7) DEFAULT NULL, `rho` decimal(12,7) DEFAULT NULL, `anl_rho` decimal(12,7) DEFAULT NULL, `theta` decimal(12,8) DEFAULT NULL, `anl_theta` decimal(12,8) DEFAULT NULL, `dyg` decimal(12,7) DEFAULT NULL, `delta_pos` decimal(12,8) DEFAULT NULL, `delta_cash` decimal(14,6) DEFAULT NULL, `gamma_pos` decimal(12,8) DEFAULT NULL, `gamma_cash` decimal(14,6) DEFAULT NULL, `vega_pos` decimal(14,7) DEFAULT NULL, `rho_pos` decimal(14,7) DEFAULT NULL, `theta_pos` decimal(14,8) DEFAULT NULL, `premium` decimal(12,4) DEFAULT NULL, `pnl_cashlike` decimal(12,4) DEFAULT NULL, `pnl_option` decimal(12,4) DEFAULT NULL, `delta_pnl_attr` decimal(14,6) DEFAULT NULL, `gamma_pnl_attr` decimal(14,6) DEFAULT NULL, `vega_pnl_attr` decimal(14,6) DEFAULT NULL, `rho_pnl_attr` decimal(14,6) DEFAULT NULL, `theta_pnl_attr` decimal(14,6) DEFAULT NULL, `divyield_pnl_attr` decimal(14,6) DEFAULT NULL, `unexplaind_pnl_attr` decimal(14,6) DEFAULT NULL, `one_vol` tinyint(1) DEFAULT 0, `parity_check` tinyint(1) DEFAULT 0, `closeout` tinyint(1) DEFAULT 0, `primary_method` tinyint(1) NOT NULL DEFAULT 1, `method_str` varchar(50) DEFAULT NULL, `index_fwd_code` char(6) DEFAULT NULL, `hedge_price` decimal(12,4) DEFAULT NULL, `trade_price` decimal(12,4) DEFAULT NULL, `basis` decimal(12,4) DEFAULT NULL, `dividend` decimal(12,4) DEFAULT NULL, `pnl_total` decimal(14,4) DEFAULT NULL, `pnl_delta` decimal(14,4) DEFAULT NULL, `pnl_trade` decimal(14,4) DEFAULT NULL, `pnl_basis` decimal(14,4) DEFAULT NULL, `pnl_unexplained` decimal(14,4) DEFAULT NULL, `hedge_cash_check` decimal(14,4) DEFAULT NULL, `hedge_position` int(11) DEFAULT NULL, `hedge_trade` int(11) DEFAULT NULL, `tc` decimal(7,4) NOT NULL, `batch_id` int(11) NOT NULL ) ENGINE=Columnstore DEFAULT CHARSET=utf8; CREATE TABLE `load_batch` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(50) DEFAULT NULL, `terminalbook` varchar(50) DEFAULT NULL, `marketdate` date NOT NULL, `start` datetime NOT NULL, `finish` datetime DEFAULT NULL, `edit_dt` datetime(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6), `status` enum('FAIL','SUCCESS','INVALID','STARTED') DEFAULT 'STARTED', PRIMARY KEY (`id`), KEY `terminalbook` (`terminalbook`) USING BTREE, KEY `type_and_date` (`type`,`marketdate`) USING BTREE, KEY `id_status` (`id`,`status`) ) ENGINE=InnoDB AUTO_INCREMENT=276 DEFAULT CHARSET=utf8;