| 207 | blueprint.parser = self |
| 208 | |
| 209 | def locate_table(self, schema: str, name: str) -> "Table": |
| 210 | if not self.database: |
| 211 | raise RuntimeError("Database is not ready") |
| 212 | # first by alias |
| 213 | result = self.database.table_dict.get(name) |
| 214 | if result is None: |
| 215 | full_name = f"{schema}.{name}" |
| 216 | result = self.database.table_dict.get(full_name) |
| 217 | if result is None: |
| 218 | raise TableNotFoundError(f"Table {full_name} not present in the database") |
| 219 | return result |
| 220 | |
| 221 | def build_database(self): |
| 222 | self.database = Database( |