surfacevisualizationmermaid_timeline
Visualizationpipeline · returns table

MERMAID_TIMELINE

Convert timeline data to Mermaid timeline visualization

Table-in, table-out — composes downstream of SELECTs.

visualizationllmpipeline-composabletext

Syntax

THEN MERMAID_TIMELINE
THEN MERMAID_TIMELINE({{ timestamp_col }})
THEN MERMAID_TIMELINE({{ timestamp_col }}, {{ event_col }})

Arguments

nametypedescription
timestamp_col(optional)VARCHAR
event_col(optional)VARCHAR
_tableTABLE

About

PIPELINE cascade for converting timeline data to Mermaid timeline visualization. Uses pure Python - no LLM calls. Usage: SELECT * FROM docs, LATERAL timeline_rows(content) t THEN MERMAID_TIMELINE SELECT date AS timestamp, description AS event FROM events THEN MERMAID_TIMELINE('date', 'description')

Examples

Produces Mermaid timeline output from timestamped events

SELECT
  *
FROM
  (
    VALUES
      ('2024-01', 'Kickoff'),
      ('2024-02', 'Launch')
  ) AS t (timestamp, event) THEN MERMAID_TIMELINE THEN PYTHON (
    'result = pd.DataFrame({"ok":[df.iloc[0]["format"] == "mermaid-timeline" and "Kickoff" in df.iloc[0]["mermaid"]]})'
  )

Nearby rabbit holes

same domain
Climb back to The Looking Glass