Skip to content

Commit

Permalink
refine changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-kschmaus committed Jan 22, 2025
1 parent 9989ead commit bf84c7a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion journeys/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,15 @@ def _remove_search_form(column: str) -> None:
if search_key in cortex_search_configs:
config: CortexSearchConfig = cortex_search_configs[search_key]
database, schema, _ = config.table_fqn.split(".")

column.cortex_search_service = CortexSearchService(
database=database,
schema=schema,
service=config.service_name,
literal_column=config.column_name,
)

st.session_state["updated_tables"] = tables
st.rerun()


Expand All @@ -319,7 +322,7 @@ def create_cortex_search_services() -> None:


def save_yaml() -> None:
tables = st.session_state["tables"]
tables = st.session_state["updated_tables"]
context = translate_data_class_tables_to_model_protobuf(
raw_tables=tables,
semantic_model_name=st.session_state["semantic_model_name"],
Expand Down
4 changes: 2 additions & 2 deletions semantic_model_generator/protos/semantic_model.proto
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ message Metric {
MetricsFilter filter = 5 [(optional) = true];
}

message MetricsFilter { string expr = 1 [(sql_expression) = true]; }
message MetricsFilter {string expr = 1 [(sql_expression) = true];}

// Type of the join - inner, left outer, etc.
enum JoinType {
Expand Down Expand Up @@ -364,4 +364,4 @@ message VerifiedQuery {
}

// VerifiedQueryRepository is a simply a collection of verified queries.
message VerifiedQueryRepository { repeated VerifiedQuery verified_queries = 1; }
message VerifiedQueryRepository {repeated VerifiedQuery verified_queries = 1;}
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _add_column_comments(
i = 0
for column in columns:
if not column.comment:
column.comment = comments[i]
column.comment = comments[i].strip()
i += 1


Expand All @@ -269,7 +269,7 @@ def _get_column_representation(
cursor_execute = cursor.execute(
f"""
select distinct "{column_name}" from {table_fqn}
where {column_name} is not null
where "{column_name}" is not null
limit {max_string_sample_values + 1}
"""
)
Expand Down

0 comments on commit bf84c7a

Please sign in to comment.