We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef9e4e6 commit 4eb7a3eCopy full SHA for 4eb7a3e
dataherald/db_scanner/repository/base.py
@@ -53,14 +53,18 @@ def save_table_info(self, table_info: TableDescription) -> TableDescription:
53
table_info_dict = {
54
k: v for k, v in table_info_dict.items() if v is not None and v != []
55
}
56
+
57
+ query = {
58
+ "db_connection_id": table_info_dict["db_connection_id"],
59
+ "table_name": table_info_dict["table_name"],
60
+ }
61
+ if "schema_name" in table_info_dict:
62
+ query["schema_name"] = table_info_dict["schema_name"]
63
64
table_info.id = str(
65
self.storage.update_or_create(
66
DB_COLLECTION,
- {
- "db_connection_id": table_info_dict["db_connection_id"],
- "table_name": table_info_dict["table_name"],
- "schema_name": table_info_dict["schema_name"],
- },
67
+ query,
68
table_info_dict,
69
)
70
0 commit comments