How to specify directory when reading table?

Mado
Valued Contributor II

Hi,

Assume that I have created several tables in Databricks workspace. If two tables have similar names but stored in different folders, how I can read them by "spark.read.table".

I ask this question because input to the "spark.read.table" is only table name not location.

Hubert-Dudek
Databricks MVP

spark.read.table reads table registered in catalog/metastore. If you have multiple databases in metastore, just prefix table name with database name db.table


My blog: https://databrickster.medium.com/

View solution in original post