WINDOW_FUNNEL (Lakehouse v2)
Procura cadeias de eventos em uma sequência ordenada por tempo e retorna o comprimento máximo da cadeia.
Sintaxe do Analyze
Seção intitulada “Sintaxe do Analyze”func.window_funnel(86400, get_column(table, 'ts'), cond1, cond2)Exemplos do Analyze
Seção intitulada “Exemplos do Analyze”func.window_funnel(86400, get_column(table, 'event_time'), get_column(table, 'step1'), get_column(table, 'step2'))Sintaxe SQL
Seção intitulada “Sintaxe SQL”WINDOW_FUNNEL(86400, <ts>, cond1, cond2)Exemplos SQL
Seção intitulada “Exemplos SQL”SELECT user_id, WINDOW_FUNNEL(86400, event_time, event = 'view', event = 'cart', event = 'purchase')FROM user_events GROUP BY user_id;
┌─────────┬─────────────────┐│ user_id │ window_funnel │├─────────┼─────────────────┤│ 1 │ 3 ││ 2 │ 2 ││ 3 │ 1 │└─────────┴─────────────────┘