getSchemaByCatalog

Syntax

getSchemaByCatalog(catalog)

Details

Get schemas within a catalog.

Parameters

catalog is a string specifying the catalog name.

Returns

A table containing the schema name, dbUrl, and comment.

Examples

After a schema comment is set, the comment column contains the corresponding description.

catalogName = "securitiesMarketCatalog"
schemaName = "equityMarket"

if (existsCatalog(catalog=catalogName)) {
    dropCatalog(catalog=catalogName)
}

createCatalog(catalog=catalogName)
go
create database securitiesMarketCatalog.equityMarket partitioned by VALUE(1..3)
setSchemaComment(catalog=catalogName, schema=schemaName, comment="China A-share market data")
select schema, comment from getSchemaByCatalog(catalog=catalogName)
schema comment
equityMarket China A-share market data

Related functions: getSchemaComment, setSchemaComment