Skip to content

Commit 0ffc51f

Browse files
committed
Data dictionary bug fixes
1 parent b129acf commit 0ffc51f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

adi_function_app/mark_up_cleaner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the MIT License.
33
import logging
44
import json
5-
import re
5+
import regex as re
66

77

88
def get_sections(text: str) -> list:

text_2_sql/text_2_sql_core/src/text_2_sql_core/data_dictionary/databricks_data_dictionary_creator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def extract_distinct_values_sql_query(
112112
Returns:
113113
str: The SQL query to extract distinct values from a column.
114114
"""
115-
return f"""SELECT DISTINCT {column.name} FROM {self.catalog}.{entity.entity} WHERE {column.name} IS NOT NULL ORDER BY {column.name} DESC;"""
115+
return f"""SELECT DISTINCT {column.name} FROM {self.catalog}.{entity.entity_schema}.{entity.entity} WHERE {column.name} IS NOT NULL ORDER BY {column.name} DESC;"""
116116

117117

118118
if __name__ == "__main__":

text_2_sql/text_2_sql_core/src/text_2_sql_core/prompts/answer_agent.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ system_message:
1414
{'sql_result_snippet': <SQL QUERY RESULT 2>, 'sql_query_used': '<SOURCE 2 SQL QUERY>', 'explanation': '<EXPLANATION OF SQL QUERY 2>'},
1515
]
1616
}
17+
1718
"

0 commit comments

Comments
 (0)