clickhouse: commit exit-leg/reconstruction/maras DDLs + UV/violet DDLs (M1 vendor reconcile, upstream-first)
This commit is contained in:
25
prod/clickhouse/uv/04_stop_watch_events.sql
Normal file
25
prod/clickhouse/uv/04_stop_watch_events.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
-- UV shadow stop-watcher events — C11 overshoot ledger
|
||||
-- READ-ONLY wrt BLUE sources. INSERT only via StopWatcher.
|
||||
-- Namespace: dolphin_uv ONLY.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS dolphin_uv.stop_watch_events
|
||||
(
|
||||
`ts` DateTime64(3, 'UTC'),
|
||||
`trade_id` String,
|
||||
`asset` LowCardinality(String),
|
||||
`side` LowCardinality(String),
|
||||
`entry_price` Float64,
|
||||
`breach_price` Float64,
|
||||
`adverse_pct` Float32,
|
||||
`spread_bps` Float32,
|
||||
`depth_1pct_usd` Float64,
|
||||
`obf_lag_ms` Float32,
|
||||
`kind` LowCardinality(String),
|
||||
`escalation_step` UInt16 DEFAULT 0,
|
||||
`resolved_exit_adverse_pct` Float32 DEFAULT 0,
|
||||
`resolved_excess_vs_contract` Float32 DEFAULT 0
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
PARTITION BY toYYYYMM(ts)
|
||||
ORDER BY (ts, trade_id)
|
||||
SETTINGS index_granularity = 8192;
|
||||
Reference in New Issue
Block a user