Visualize Snowpark graph tables
The Snowpark adapter follows the same graph shape as the pandas adapter. It
materializes the selected Snowpark DataFrames with .to_pandas() in the
notebook kernel, then applies Garphield’s ordinary table-to-project conversion.
Show Snowpark tables
Section titled “Show Snowpark tables”Pass an edge table and, optionally, a node table to show_snowpark():
import garphield as gph
edges = session.table("GRAPH_EDGES")nodes = session.table("GRAPH_NODES")
view = gph.show_snowpark( edges, nodes, source="SOURCE", target="TARGET", node_id="ID",)The edge table needs source and target columns. The node table supplies node
attributes when present. Rename the structural columns with source, target,
and node_id; use edge_key and multigraph=True for parallel edges.
show_snowpark() returns the same synchronous GraphView as show(). You can
select, bind, fit, read the project back, or open the full workbench:
view.select(["ada", "grace"]).fit()project = view.to_project()Materialize the tables before conversion
Section titled “Materialize the tables before conversion”Snowpark computation happens before the graph enters Garphield. The adapter
requires each selected value to expose a callable to_pandas() method and
requires that method to return a pandas DataFrame. The full selected tables are
materialized in the kernel; filtering or limiting them in Snowflake first can
keep the handoff bounded.
After materialization, identity, direction, multigraph state, edge keys, and attributes follow the conversion rules. Use Notebooks for chrome, HTML export, and browser handoff behavior.
Return the project
Section titled “Return the project”The notebook view remains the owner until you choose Open in Garphield and
send the project back. While the browser owns editing, notebook mutations raise
OwnershipError; after Return to notebook, the same GraphView exposes the
settled project.