Skip to content

Catalogs Utility

Loading Catalog by Name

load(
  name: String,
  conf: SQLConf): CatalogPlugin

load finds the class name of the CatalogPlugin in the given SQLConf by spark.sql.catalog.[name] key.

load loads the class and makes sure that it is a CatalogPlugin.

In the end, load creates a new instance (using a public no-arg constructor) and requests the CatalogPlugin to initialize (with the given name and all options that use spark.sql.catalog.[name] prefix).

Exceptions

load throws a CatalogNotFoundException when the spark.sql.catalog.[name] key could not be found:

Catalog '[name]' plugin class not found: spark.sql.catalog.[name] is not defined

load throws a SparkException when the class name is not of the CatalogPlugin type:

Plugin class for catalog '[name]' does not implement CatalogPlugin: [pluginClassName]

Usage

load is used when:

Back to top