Retention for hive_metastore tables

mattiags
New Contributor II

Hi

I have a notebook that creates tables in the hive_metastore with the following code:

 

df.write.format("delta").mode("overwrite").saveAsTable(output_table_name)
 
Which is the retantion for the data saved in the hive metastore? is there any configuration for keeping the data for like 5 years?

Stefan-Koch
Databricks Partner

Hi mattiags

As long as you do not delete the data via notebook or in the data lake, it will not be deleted in any other way. This means that there is no retention time in this sense, or conversely, it is infinite until you deliberately delete the data.

View solution in original post