Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Get the database with the specified name. This throws an AnalysisException when the database cannot be found.
Syntax
getDatabase(dbName: str)
Parameters
| Parameter | Type | Description |
|---|---|---|
dbName |
str | Name of the database to get. |
Returns
Database
The database found by the name.
Examples
spark.catalog.getDatabase("default")
# Database(name='default', catalog='spark_catalog', description='default database', ...
# Using the fully qualified name with the catalog name.
spark.catalog.getDatabase("spark_catalog.default")
# Database(name='default', catalog='spark_catalog', description='default database', ...