Share via


Catalog.CurrentDatabase Method

Definition

Returns the current database in this session. By default your session will be connected to the "default" database (named "default") and to change database either use SetCurrentDatabase("databaseName") or SparkSession.Sql("USE DATABASE databaseName").

public string CurrentDatabase ();
member this.CurrentDatabase : unit -> string
Public Function CurrentDatabase () As String

Returns

The database name as a string.

Applies to