Convert triples to Mermaid graph visualization
Table-in, table-out — composes downstream of SELECTs.
THEN MERMAID_TRIPLESTHEN MERMAID_TRIPLES({{ subject_col }})THEN MERMAID_TRIPLES({{ subject_col }}, {{ predicate_col }}, {{ object_col }})THEN MERMAID_TRIPLES({{ subject_col }}, {{ predicate_col }}, {{ object_col }}, {{ direction }})| name | type | description |
|---|---|---|
| subject_col(optional) | VARCHAR | — |
| predicate_col(optional) | VARCHAR | — |
| object_col(optional) | VARCHAR | — |
| direction(optional) | VARCHAR | — |
| _table | TABLE | — |
Produces Mermaid graph output from subject-predicate-object triples
SELECT
*
FROM
(
VALUES
('Alice', 'knows', 'Bob'),
('Bob', 'reports_to', 'Carol')
) AS t (subject, predicate, object) THEN MERMAID_TRIPLES THEN PYTHON (
'result = pd.DataFrame({"ok":[df.iloc[0]["format"] == "mermaid-graph" and "Alice" in df.iloc[0]["mermaid"] and "Bob" in df.iloc[0]["mermaid"]]})'
)Convert timeline data to Mermaid timeline visualization
Render a chart specification to PNG image
Artistically stylize a chart image while preserving data
Generate a Plotly chart from data using LLM
Convert triples to relational node/edge graph tables for recursive CTE traversal
Generate a Vega-Lite chart from data using LLM
Convert triples to Mermaid graph visualization
Table-in, table-out — composes downstream of SELECTs.
THEN MERMAID_TRIPLESTHEN MERMAID_TRIPLES({{ subject_col }})THEN MERMAID_TRIPLES({{ subject_col }}, {{ predicate_col }}, {{ object_col }})THEN MERMAID_TRIPLES({{ subject_col }}, {{ predicate_col }}, {{ object_col }}, {{ direction }})| name | type | description |
|---|---|---|
| subject_col(optional) | VARCHAR | — |
| predicate_col(optional) | VARCHAR | — |
| object_col(optional) | VARCHAR | — |
| direction(optional) | VARCHAR | — |
| _table | TABLE | — |
Produces Mermaid graph output from subject-predicate-object triples
SELECT
*
FROM
(
VALUES
('Alice', 'knows', 'Bob'),
('Bob', 'reports_to', 'Carol')
) AS t (subject, predicate, object) THEN MERMAID_TRIPLES THEN PYTHON (
'result = pd.DataFrame({"ok":[df.iloc[0]["format"] == "mermaid-graph" and "Alice" in df.iloc[0]["mermaid"] and "Bob" in df.iloc[0]["mermaid"]]})'
)Convert timeline data to Mermaid timeline visualization
Render a chart specification to PNG image
Artistically stylize a chart image while preserving data
Generate a Plotly chart from data using LLM
Convert triples to relational node/edge graph tables for recursive CTE traversal
Generate a Vega-Lite chart from data using LLM