-- Analytical fact table: trade_signals
-- Partitioned by dt on MinIO

CREATE TABLE IF NOT EXISTS lakehouse.stonks.trade_signals (
    signal_id         VARCHAR,
    ticker            VARCHAR,
    trend_direction   VARCHAR,
    trend_strength    DOUBLE,
    confidence        DOUBLE,
    action            VARCHAR,
    time_horizon      VARCHAR,
    generated_at      TIMESTAMP(6) WITH TIME ZONE,
    dt                DATE
) WITH (
    format = 'PARQUET',
    partitioned_by = ARRAY['dt'],
    external_location = 's3a://stonks-lakehouse/warehouse/trade_signals/'
);
