Finding the list of tables/views in a schema/database in Snowflake
To get the list of all the views, and its definition in a database,
select table_catalog, table_schema, table_name, view_definition, is_secure from information_schema.views where table_catalog = 'my-database';
To get the list of all the tables, and its definition in a database,
select table_catalog, table_schema, table_name
from information_schema.tables where table_catalog = 'my-database';
Or alternately, we can use the show tables command:
Show tables like 'sales%';
or
Show views like 'sales%';
or simply,
show views;
Ryan-Dallas
posted on 20 Oct 18Enjoy great content like this and a lot more !
Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds
Post Comment