Files
sentiment-engine/prod/clickhouse/uv/02_prime_scans.sql

21 lines
841 B
MySQL
Raw Normal View History

-- dolphin_uv.prime_scans — raw scan surface per NG7 scan
-- Created by T2 Part 1 journal hardening (scope addition)
-- Captures the raw scan surface that BLUE receives from Hazelcast
-- This is the input surface that currently exists nowhere durable.
-- Closes the input-recording gap forever.
CREATE TABLE IF NOT EXISTS dolphin_uv.prime_scans
(
ts DateTime64(3), -- UTC, 'YYYY-MM-DD HH:MM:SS.fff'
scan_number UInt64,
assets String, -- JSON array of asset symbols
asset_prices String, -- JSON array of prices
vel_div Float64,
w50_velocity Float64,
w750_velocity Float64,
instability_50 Float64,
)
ENGINE = MergeTree()
ORDER BY (scan_number, ts)
SETTINGS index_granularity = 8192