- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 04:54 AM
I noticed this issue is currently caused when you rename a catalog. The contents of <catalog>.information_schema are all views like this:
SELECT * FROM system.information_schema.columns WHERE table_catalog = '<catalog>'
If you rename the catalog, the view definitions don't get updated. For example, if you made a catalog named `my_awesome_catalog`, then the view in `my_awesome_catalog.information_schema` will be:
SELECT * FROM system.information_schema.columns WHERE table_catalog = 'my_awesome_catalog'
If you then renamed `my_awesome_catalog` to `my_new_named_catalog`, the view inside `my_new_named_catalog.information_schema` will remain unchanged, and will still be:
SELECT * FROM system.information_schema.columns WHERE table_catalog = 'my_awesome_catalog'
Assuming you no longer have a catalog named `my_awesome_catalog`, this will return zero rows. Even worse, if you make a new catalog named `my_awesome_catalog`, the `my_new_named_catalog.information_schema` views will return the wrong information completely.
Not great overall, definitively an easily identifiable bug in Databricks.