main
Guofu Li 2 years ago
parent 0ca31dcd47
commit 1764036d81

@ -5,7 +5,7 @@ import dolphindb as ddb
class DDBBase(object):
ddb_config = {
'host' : '192.168.1.167',
'host' : '192.168.1.7',
'username' : 'admin',
'password' : '123456',
}

@ -365,8 +365,9 @@ class DDBHFTLoader(DDBLoader):
elif (type_name, stock_id, 'START') in self.dump_journal_df.index:
# 任务已经开始,但是没有完全结束,就需要逐个检查日期,跳过已经录入输入的交易日数据
# 同时也不会再往日志文件中写入START记录
partitioned_table_name = type_name + self.ddb_partition_table_suffix
_journal_dt = self.ddb_sess.run(f"""
select m_nDate from tbl where code='{stock_id}' group by m_nDate map;
select m_nDate from loadTable("{self.ddb_path}", "{partitioned_table_name}") where code='{stock_id}' group by m_nDate map;
""").set_index('m_nDate')
else:
_journal_dt = None

Loading…
Cancel
Save