While executing show create table
in hive, we have location url in the statement for both internal and external table. But when executing the same statement through spark (pyspark) we are only having location if the table is external. Is there any settings to have this location for internal table as well?
I want to collect the create statements with location for all tables from onprem to databricks. Databricks also displays create statements without location for internal tables.
We can get from location from desc table. But I would like to know if there is tweak to have it in show create table
.
Example Hive:
show create table db1.table1
In pyspark:
createStatement = spark.sql("show create table db1.table1")
createStatement.show()