In spark SQL when I create temp views they get stored in default database.
It seems I can create a user-defined database as well
spark.sql("create database test")
How can I create temp views in the user-defined database instead of the default database, in above for example in "test" database?
Also, when I create a temp view and run command
spark.sql("show tables in default")
it lists all the tables in the database, here I see a column "isTemporary" is set to True. What is the significance of this column, and how can, for a particular view I can set it to "False" and if I do so, will this table be permanently stored in Spark?