fix: prepare eqt simdata script

This commit is contained in:
Oleg Sheynin 2024-12-06 20:08:53 -05:00
parent 1cfac2b32d
commit 92538f0819
3 changed files with 7 additions and 7 deletions

View File

@ -1 +1 @@
1.9.2.F1,fix: prepare eqt simdata script
1.9.2.F2,fix: prepare eqt simdata script

View File

@ -152,7 +152,7 @@ sqlite3 ${ResultDbFile} <<EOF
ATTACH '${SourceDbFile}' AS source_db;
BEGIN;
INSERT OR IGNORE INTO md_trades SELECT
datetime(exchange_ts_ns / 1000000000, 'unixepoch') || '.' || printf('%06d', (exchange_ts_ns % 1000000000) / 1000) as tstmp,
datetime(exchange_ts_ns / 1000000000, 'unixepoch') || '.' || printf('%06d', (exchange_ts_ns % 1000000000) / 1000) as tstamp,
time as tstamp_ns,
exchange_id,
instrument_id,
@ -168,7 +168,7 @@ COMMIT;
BEGIN;
INSERT OR IGNORE INTO md_trades
SELECT
datetime(exchange_ts_ns / 1000000000, 'unixepoch') || '.' || printf('%06d', (exchange_ts_ns % 1000000000) / 1000) as tstmp,
datetime(exchange_ts_ns / 1000000000, 'unixepoch') || '.' || printf('%06d', (exchange_ts_ns % 1000000000) / 1000) as tstamp,
time as tstamp_ns,
exchange_id,
instrument_id,
@ -189,7 +189,7 @@ sqlite3 ${ResultDbFile} <<EOF
ATTACH '${SourceDbFile}' AS source_db;
BEGIN;
INSERT OR IGNORE INTO md_quotes SELECT
datetime(exchange_ts_ns / 1000000000, 'unixepoch') || '.' || printf('%06d', (exchange_ts_ns % 1000000000) / 1000) as tstmp,
datetime(exchange_ts_ns / 1000000000, 'unixepoch') || '.' || printf('%06d', (exchange_ts_ns % 1000000000) / 1000) as tstamp,
time as tstamp_ns,
exchange_id,
instrument_id,

View File

@ -168,7 +168,7 @@ for sym in ${Symbols[@]}; do
sqlite3 ${ResultDbFile} <<EOF
ATTACH '${src_qat_db}' AS source_db;
BEGIN;
INSERT INTO md_trades SELECT
INSERT OR IGNORE INTO md_trades SELECT
tstamp,
tstamp_ns,
exchange_id,
@ -183,7 +183,7 @@ FROM source_db.md_trades;
COMMIT;
BEGIN;
INSERT INTO md_quotes SELECT
INSERT OR IGNORE INTO md_quotes SELECT
tstamp,
tstamp_ns,
exchange_id,
@ -202,7 +202,7 @@ EOF
sqlite3 ${ResultDbFile} <<EOF
ATTACH '${src_hbar_db}' AS source_db;
BEGIN;
INSERT INTO md_1min_bars SELECT
INSERT OR IGNORE INTO md_1min_bars SELECT
tstamp,
tstamp_ns,
exchange_id,