VIOLET V1a: dolphin_violet DDL set + statement-wise applier (applied + verified)
14 tables consolidated from the LIVE post-ALTER dolphin_pink schema (maras_tp + provenance folded into base CREATEs — a fresh DB never replays ALTER chains) + violet_feed_divergence (scan-vs-venue divergence metric, session_id + plane seqs + mono_ns). apply_violet_ddl.py posts ONE statement per HTTP request (multi-statement posts fail — proven on pink 08), is idempotent (all IF NOT EXISTS, double-apply tested live), and verifies the expected table set. Applied to live CH: verify all 14 present. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
33
prod/clickhouse/violet/10_adaptive_exit_shadow.sql
Normal file
33
prod/clickhouse/violet/10_adaptive_exit_shadow.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
-- dolphin_violet DDL — consolidated from the LIVE dolphin_pink schema
|
||||
-- (post-ALTER: includes maras_tp + provenance columns). Generated 2026-06-12.
|
||||
-- Apply via apply_violet_ddl.py (one statement per HTTP POST).
|
||||
|
||||
CREATE TABLE IF NOT EXISTS dolphin_violet.adaptive_exit_shadow
|
||||
(
|
||||
`ts` DateTime64(6, 'UTC'),
|
||||
`ts_day` Date MATERIALIZED toDate(ts),
|
||||
`trade_id` String,
|
||||
`asset` LowCardinality(String),
|
||||
`bucket_id` UInt8,
|
||||
`bars_held` UInt16,
|
||||
`mae_norm` Float32,
|
||||
`mfe_norm` Float32,
|
||||
`tau_norm` Float32,
|
||||
`p_cont` Float32,
|
||||
`vel_div_entry` Float32,
|
||||
`vel_div_now` Float32,
|
||||
`action` LowCardinality(String),
|
||||
`exit_reason` LowCardinality(String),
|
||||
`actual_exit` LowCardinality(String),
|
||||
`pnl_pct` Float32,
|
||||
`runtime_namespace` LowCardinality(String) DEFAULT '',
|
||||
`strategy_namespace` LowCardinality(String) DEFAULT '',
|
||||
`event_namespace` LowCardinality(String) DEFAULT '',
|
||||
`actor_name` LowCardinality(String) DEFAULT '',
|
||||
`exec_venue` LowCardinality(String) DEFAULT '',
|
||||
`data_venue` LowCardinality(String) DEFAULT ''
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY (ts_day, asset, ts)
|
||||
TTL ts_day + toIntervalDay(90)
|
||||
SETTINGS index_granularity = 8192;
|
||||
Reference in New Issue
Block a user