Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add id_field to proto definition #167

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions semantic_model_generator/protos/semantic_model.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package semantic_model_generator;
extend google.protobuf.FieldOptions {
optional bool optional = 51234;
optional bool sql_expression = 51235;
optional bool id_field = 51236;
}

// AggregationType defines a list of various aggregations.
Expand Down Expand Up @@ -52,7 +53,7 @@ message RetrievalResult {
// e.g. `base_column1 + base_column2`.
message Column {
// A descriptive name for this column.
string name = 1;
string name = 1 [(id_field) = true];
// A list of other terms/phrases used to refer to this column.
repeated string synonyms = 2 [(optional) = true];
// A brief description about this column, including things like what data this
Expand Down Expand Up @@ -88,7 +89,7 @@ message Column {
// context_to_column_format() of snowpilot/semantic_context/protos/schema.py.
message Dimension {
// A descriptive name for this dimension.
string name = 1;
string name = 1 [(id_field) = true];
// A list of other terms/phrases used to refer to this dimension.
repeated string synonyms = 2 [(optional) = true];
// A brief description about this dimension, including things like
Expand All @@ -113,7 +114,7 @@ message Dimension {
// to_column_format() of snowpilot/semantic_context/utils/utils.py.
message TimeDimension {
// A descriptive name for this time dimension.
string name = 1;
string name = 1 [(id_field) = true];
// A list of other terms/phrases used to refer to this time dimension.
repeated string synonyms = 2 [(optional) = true];
// A brief description about this time dimension, including things like
Expand All @@ -136,7 +137,7 @@ message TimeDimension {
// to_column_format() of snowpilot/semantic_context/utils/utils.py.
message Measure {
// A descriptive name for this measure.
string name = 1;
string name = 1 [(id_field) = true];
// A list of other terms/phrases used to refer to this measure.
repeated string synonyms = 2 [(optional) = true];
// A brief description about this measure, including things like what data
Expand Down Expand Up @@ -188,7 +189,7 @@ message PrimaryKey {
// table and/or introduce new derived columns.
message Table {
// A descriptive name for this table.
string name = 1;
string name = 1 [(id_field) = true];
// A list of other term/phrases used to refer to this table.
repeated string synonyms = 2 [(optional) = true];
// A brief description of this table, including details of what kinds of
Expand Down Expand Up @@ -221,7 +222,7 @@ message Table {
// tables.
message Metric {
// A descriptive name of the metric.
string name = 1;
string name = 1 [(id_field) = true];
// A list of other term/phrases used to refer to this metric.
repeated string synonyms = 2 [(optional) = true];
// A brief description of this metric, including details of what it computes.
Expand Down
Loading
Loading