Skip to content

CatalogOperation

type CatalogOperation =
| {
op: "listDatabases";
pattern?: string;
}
| {
dbName?: string;
op: "listTables";
pattern?: string;
}
| {
dbName?: string;
op: "listColumns";
tableName: string;
}
| {
dbName?: string;
op: "listFunctions";
pattern?: string;
}
| {
op: "listCatalogs";
pattern?: string;
}
| {
dbName: string;
op: "getDatabase";
}
| {
dbName?: string;
op: "getTable";
tableName: string;
}
| {
dbName?: string;
functionName: string;
op: "getFunction";
}
| {
dbName?: string;
op: "tableExists";
tableName: string;
}
| {
dbName: string;
op: "databaseExists";
}
| {
dbName?: string;
functionName: string;
op: "functionExists";
}
| {
op: "isCached";
tableName: string;
}
| {
op: "dropTempView";
viewName: string;
}
| {
op: "dropGlobalTempView";
viewName: string;
}
| {
op: "currentDatabase";
}
| {
dbName: string;
op: "setCurrentDatabase";
}
| {
op: "currentCatalog";
}
| {
catalogName: string;
op: "setCurrentCatalog";
}
| {
op: "cacheTable";
storageLevel?: StorageLevel;
tableName: string;
}
| {
op: "uncacheTable";
tableName: string;
}
| {
op: "clearCache";
}
| {
op: "refreshTable";
tableName: string;
}
| {
op: "refreshByPath";
path: string;
}
| {
op: "recoverPartitions";
tableName: string;
}
| {
description?: string;
op: "createTable";
options?: Record<string, string>;
path?: string;
schema?: string;
source?: string;
tableName: string;
};

Defined in: plan/logical-plan.ts:335

One operation against the Spark catalog (databases, tables, functions, temp views, caching, metadata refresh).

Catalog operations travel inside a CatalogPlan as a Spark Connect Relation.Catalog; the server returns the result as a DataFrame, decoded from Arrow batches like any other query.

  • Spark Connect: Relation.Catalog { cat_type oneof }