0

I'm trying to figure out a way to list the views in a given delta-Lake database? Is there anything available that's equivalent of sqlServer's INFORMATION_SCHEMA or something obvious that I'm missing? I have tried the following without any luck:

spark.sql("SELECT * FROM INFORMATION_SCHEMA.VIEWS")

Thank you in advance.

Manish Karki
  • 473
  • 2
  • 11

1 Answers1

1

Delta Lake is not a database. It's a type of tables sitting in your Hive Metastore.

If you would like to see views in a database, you can use Spark SQL SHOW VIEWS command.

zsxwing
  • 20,270
  • 4
  • 37
  • 59
  • thanks for the answer, but sadly we're on 2.4.3 which doesn't seem to support `SHOW VIEWS`, though show tables had it listed out along with tables which I'm perfectly fine to have for now as we have the names with prefix vw for views. – Manish Karki Aug 06 '20 at 16:28