get_structure_graph
Extract a dataset's internal structure graph to map fields, record sets, files, and foreign-key joins, tracing lineage and clarifying architecture for loading code.
Instructions
Extracts the internal structure graph of a Croissant document.
Builds the directed multigraph that ``mlcroissant`` uses internally for
static analysis: nodes are Metadata / FileObject / FileSet / RecordSet /
Field objects and edges connect fields to their data sources, record sets
to their fields, files to archives they are contained in, and referenced
(foreign-key) fields.
Usage: Use this tool to reason about dataset lineage and dependencies,
e.g. "which files feed this field?", "what does this join look like?",
or to explain a dataset's architecture before writing loading code.
Returns:
--------
StructureGraph containing:
- nodes: Every node with @id, type, name and parent @id.
- edges: Directed edges as {source, target} @id pairs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jsonld_url | No | URL of a Croissant/GeoCroissant JSON-LD document. | |
| jsonld_path | No | Path to a local Croissant/GeoCroissant file. | |
| jsonld_content | No | Raw JSON string of a Croissant document. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | Directed edges (source @id -> target @id). | |
| nodes | Yes | Graph nodes with @id, type and parent information. | |
| edge_count | Yes | Number of edges in the graph. | |
| node_count | Yes | Number of nodes in the graph. |