From 67736898ef1323b2f02196625b9ef6326f037f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Jos=C3=A9=20Camacho?= Date: Mon, 18 Sep 2023 12:48:39 -0600 Subject: [PATCH] DH-4677 Fix in migration script when sql_query doesn't have a table (#168) --- dataherald/scripts/migrate_v001_to_v002.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dataherald/scripts/migrate_v001_to_v002.py b/dataherald/scripts/migrate_v001_to_v002.py index eee399e2..e1d9fd6f 100644 --- a/dataherald/scripts/migrate_v001_to_v002.py +++ b/dataherald/scripts/migrate_v001_to_v002.py @@ -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,