package semantic_model_generator

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

enum AggregationType

semantic_model.proto:22

AggregationType defines a list of various aggregations.

Used in: Column, Fact

message Column

semantic_model.proto:58

Column is analogous to a database column and defines various semantic properties of a column. A column can either simply be a column in the base database schema or it can be an arbitrary expression over the base schema, e.g. `base_column1 + base_column2`.

Used in: Table

enum ColumnKind

semantic_model.proto:35

ColumnKind defines various kinds of columns, mainly categorized into dimensions and measures.

Used in: Column

message CortexSearchService

semantic_model.proto:131

Fully qualified Cortex Search Service name.

Used in: Column, Dimension

message Dimension

semantic_model.proto:101

Dimension columns contain categorical values (e.g. state, user_type, platform). NOTE: If modifying this protobuf, make appropriate changes in context_to_column_format() of snowpilot/semantic_context/protos/schema.py.

Used in: Table

message Fact

semantic_model.proto:166

Measure columns contain numerical values (e.g. revenue, impressions, salary). NOTE: If modifying this protobuf, make appropriate changes in to_column_format() of snowpilot/semantic_context/utils/utils.py.

Used in: Table

message ForeignKey

semantic_model.proto:226

Defines a foreign key that references the primary key of another table.

Used in: Table

message FullyQualifiedTable

semantic_model.proto:206

FullyQualifiedTable is used to represent three part table names - (database, schema, table).

Used in: ForeignKey, Table

enum JoinType

semantic_model.proto:294

Type of the join - inner, left outer, etc.

Used in: Relationship

message Metric

semantic_model.proto:275

Metric are named computation over a collection of columns. For now, we only allow a metric to be defined over columns from a single table. In future, we'll expand to allowing metrics that refer to columns from multiple tables.

Used in: Table

message MetricsFilter

semantic_model.proto:291

Used in: Metric

message ModuleCustomInstructions

semantic_model.proto:337

A message that encapsulates custom instructions for each module.

Used in: SemanticModel

message NamedFilter

semantic_model.proto:192

Filter represents a named SQL expression that's used for filtering. TODO: add validation. we should only support where clause style filter (no aggregations) and reject having clauses.

Used in: Table

message PrimaryKey

semantic_model.proto:220

Defines a primary key of a table. In the general case, primary keys are a collection of columns of the table. For discussion: PK FK are potentially duplicative to join path in a semantic model. However, it implies uniqueness which can be informative for getting right aggregation level. For that reason, we are exposing only the PrimaryKey currently. Join paths seem more extensible than foreign keys for supporting join. Further experimentation is needed to see if JoinPath and ForeignKey can yield similar results.

Used in: Table

message RelationKey

semantic_model.proto:312

Used in: Relationship

message Relationship

semantic_model.proto:319

Relationship represents a join between two tables.

Used in: SemanticModel

enum RelationshipType

semantic_model.proto:304

Type of the relationship - one-to-one, many-to-one, etc.

Used in: Relationship

message RetrievalResult

semantic_model.proto:49

Used in: Column

message SemanticModel

semantic_model.proto:346

The semantic context relevant to generating SQL for answering a data question.

message Table

semantic_model.proto:238

Table is analogous to a database table and provides a simple view over an existing database table. A table can leave out some columns from the base table and/or introduce new derived columns.

Used in: SemanticModel

message TimeDimension

semantic_model.proto:141

Time dimension columns contain time values (e.g. sale_date, created_at, year). NOTE: If modifying this protobuf, make appropriate changes in to_column_format() of snowpilot/semantic_context/utils/utils.py.

Used in: Table

message VerifiedQuery

semantic_model.proto:367

VerifiedQuery represents a (question, sql) pair that has been manually verified (e.g. by an analyst) to be correct.

Used in: SemanticModel, VerifiedQueryRepository

message VerifiedQueryRepository

semantic_model.proto:387

VerifiedQueryRepository is a simply a collection of verified queries.