getSchemaView Method @beta
Get the schema view for this iModel. The view is built lazily on first call by fetching compact binary schema data through the ConcurrentQuery thread pool.
The returned SchemaView is a lightweight, read-only, synchronous API for
navigating schema metadata - classes, properties, relationships, enumerations, etc.
It is the recommended default for runtime read-only metadata access and is significantly
faster and lower-memory than schemaContext. Use schemaContext for schema authoring,
custom-attribute deserialization, or anywhere you need the full ecschema-metadata object graph.
Every call shares one accumulating view instance and concurrent calls are serialized, so a caller never observes a partially loaded view. The instance is discarded by clearCaches, for example after a schema import; the next call builds a new one. See GetSchemaViewArgs for the arguments.
getSchemaView(args?: GetSchemaViewArgs): Promise<SchemaView>
| Parameter | Type | Description |
|---|---|---|
| args | GetSchemaViewArgs |
Returns - Promise<SchemaView>
Defined in
- backend/src/IModelDb.ts Line 1774
Last Updated: 03 August, 2026