Table of contents
Collapse the table of content
Expand the table of content

usql.schemas (U-SQL)

Michael Rys|Last Updated: 5/15/2018
4 Contributors

Contains a row for each database schema in the current database context.

Column nameData typeDescription
schema_id_guidGuidSchema's unique identifier (unique within a database)
namestringSchema name (unique within a database)
database_id_guidGuidIdentifier of the database that contains the schema


The examples can be executed in Visual Studio with the Azure Data Lake Tools plug-in.

Query the usql.schemas view

USE TestReferenceDB;

OUTPUT usql.schemas
TO "/ReferenceGuide/CatalogViews/schemas.txt"
USING Outputters.Tsv(outputHeader:true);

Query the usql.schemas view with usql.databases view

@schemas =
    SELECT AS dbName,
    FROM usql.schemas AS s
    JOIN usql.databases AS d
    ON s.database_id_guid == d.database_id_guid;

OUTPUT @schemas
TO "/ReferenceGuide/CatalogViews/schemas_databases.txt"
USING Outputters.Tsv(outputHeader:true);  

See Also

© 2018 Microsoft