Forum Discussion
QUESTION::SQL ENDPOINT::INFORMATION_SCHEMA::QUERY RETURN NOTHING
- Anonymous2 years ago
In this case, with a VIEW on a user created table, it works.
But why does it not work for VIEWs on the INFORMATION_SCHEMA? Ahhh because they are all views in this schema and not tables. Duh.
- Anonymous2 years agoNot applicable
Hi Element115
The information_schema.VIEW_TABLE_USAGE is an information schema view that returns one row for each table in the current database that is used in a view. Here the current database is the lakehouse. So if the view is created using the table present in lakehouse, then the data will be displayed in the information schema. This view provides information about the objects to which the current user has permissions.
Here are some of the columns you might find in information_schema.VIEW_TABLE_USAGE:
VIEW_CATALOG: View qualifier.
VIEW_SCHEMA: Name of schema that contains the view.
VIEW_NAME: View name.
TABLE_CATALOG: Table qualifier.
TABLE_SCHEMA: Name of schema that contains the base table.
TABLE_NAME: Base table that the view is based on.
Hope this helps.