Package org.apache.calcite.model
Provides model files, in JSON format, defining schemas and other metadata.
Models are specified using a model=<uri>
parameter on
the JDBC connect string. Calcite loads the model while initializing the
connection. It first parses the JSON, then uses a
ModelHandler
as visitor over the parse
tree.
There are standard implementations of schema and table, but the user can
provide their own by implementing the
SchemaFactory
or TableFactory
interfaces and including a custom schema in the model.
There are several examples of schemas in the tutorial.
-
Class Summary Class Description JsonColumn JSON object representing a column.JsonCustomSchema JSON schema element that represents a custom schema.JsonCustomTable Custom table schema element.JsonFunction Function schema element.JsonJdbcSchema JSON object representing a schema that maps to a JDBC database.JsonLattice Element that describes a star schema and provides a framework for defining, recognizing, and recommending materialized views at various levels of aggregation.JsonMapSchema JSON object representing a schema whose tables are explicitly specified.JsonMaterialization Element that describes how a table is a materialization of a query.JsonMeasure An aggregate function applied to a column (or columns) of a lattice.JsonRoot Root schema element.JsonSchema Schema schema element.JsonStream Information about whether a table allows streaming.JsonTable Table schema element.JsonTile Materialized view within aJsonLattice
.JsonType Type schema element.JsonTypeAttribute JSON object representing a type attribute.JsonView View schema element.ModelHandler Reads a model and creates schema objects accordingly. -
Enum Summary Enum Description JsonSchema.Type Built-in schema types.ModelHandler.ExtraOperand Extra operands automatically injected into aJsonCustomSchema.operand
, as extra context for the adapter.