> This page is for Structured Data Models Client.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/sdgm/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/sdgm/_mcp/server.

# Validate the Schema

> Inspect and validate a Kumo Relational schema before making predictions

Check the schema after configuring table metadata and relationships. Validation checks structural compatibility; it cannot determine whether the schema accurately represents the business problem.

## Review the complete schema

Inspect table metadata and relationships together:

```python
print(schema)
for name, table in schema.tables.items():
    print(table)
print(schema.relationships)
```

Confirm the following:

* Each table represents one entity, event, or junction concept.
* Every primary key is non-null and unique.
* Event tables use the correct time column.
* Identifier, feature, text, and timestamp columns have appropriate semantic types.
* Every foreign key points to the intended primary-key table.
* Related key columns use compatible physical types.
* The schema contains the relational paths required by the predictive query.

## Run schema validation

```python
schema.check_consistent()
```

`check_consistent()` refuses any column whose storage and meaning contradict each other, and any relationship that cannot join. It raises `StructuredDataError` with a message naming the problem; resolve it before submitting a prediction request. After correcting metadata or relationships, run `check_consistent()` again.

> **Note**
>
> `materialize()` also calls `check_consistent()` and the engine's own graph-construction checks before sampling, so an inconsistency is caught there even if you skip the explicit call — but checking early, right after you finish editing a schema, gives you a faster and more specific failure.

> **Warning**
>
> There is no `visualize()`, `print_metadata()`, or `print_links()` on `Schema` in this client. Inspect a schema by printing it, iterating `schema.tables`, and reading `schema.relationships`, as shown above.

Successful validation does not guarantee that a timestamp, relationship, or historical window is appropriate for your prediction task. Review those choices with someone who understands the source data and business question.

When validation succeeds and the schema reflects the intended prediction task, continue to [Make Predictions](/sdgm/kumo-relational/user-guide/make-predictions/make-predictions).