Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 311deaa

Browse files
authored
Merge pull request #72 from datafold/warning-table-name
2 parents b57e864 + 06286b9 commit 311deaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data_diff/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def select_table_schema(self, path: DbPath) -> str:
233233
def query_table_schema(self, path: DbPath) -> Dict[str, ColType]:
234234
rows = self.query(self.select_table_schema(path), list)
235235
if not rows:
236-
raise RuntimeError(f"Table {'.'.join(path)} does not exist, or has no columns")
236+
raise RuntimeError(f"{self.__class__.__name__}: Table '{'.'.join(path)}' does not exist, or has no columns")
237237

238238
# Return a dict of form {name: type} after canonizaation
239239
return {row[0]: self._parse_type(*row[1:]) for row in rows}
@@ -248,7 +248,7 @@ def _normalize_table_path(self, path: DbPath) -> DbPath:
248248
elif len(path) == 2:
249249
return path
250250

251-
raise ValueError(f"Bad table path for {self}: '{'.'.join(path)}'. Expected form: schema.table")
251+
raise ValueError(f"{self.__class__.__name__}: Bad table path for {self}: '{'.'.join(path)}'. Expected form: schema.table")
252252

253253
def parse_table_name(self, name: str) -> DbPath:
254254
return parse_table_name(name)

0 commit comments

Comments
 (0)