Compare commits

...

2 Commits

Author SHA1 Message Date
oleg 31aca36fe7 fix: prepare eqt simdata script 2024-12-06 20:11:33 -05:00
oleg 92538f0819 fix: prepare eqt simdata script 2024-12-06 20:08:53 -05:00
3 changed files with 7 additions and 9 deletions
+1 -1
View File
@@ -1 +1 @@
1.9.2.F1,fix: prepare eqt simdata script
1.9.2.F3,fix: prepare eqt simdata script
+3 -3
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,
+3 -5
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,
@@ -225,8 +225,6 @@ EOF
eval ${Cmd}
done
exit
Cmd="gzip ${ResultDbFile}"
echo ${Cmd}
eval ${Cmd}