Skip to content

Commit

Permalink
DH-4677 Fix in migration script when sql_query doesn't have a table (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcjc712 authored Sep 18, 2023
1 parent 733eaea commit 6773689
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dataherald/scripts/migrate_v001_to_v002.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def add_db_connection_id(collection_name: str, storage) -> None:
golden_records = storage.find_all("golden_records")
for golden_record in golden_records:
tables = Parser(golden_record["sql_query"]).tables
if len(tables) == 0:
tables = [""]
question = golden_record["question"]
vector_store.add_record(
documents=question,
Expand Down

0 comments on commit 6773689

Please sign in to comment.