Partager via


usql.views (U-SQL)

Summary

Returns a row for each view belonging to the schemas in the current database context. The schema inherits the columns from the usql.objects view and adds the view specific properties to it.

Column name Data type Description
<inherited columns> For a list of columns that this view inherits, see usql.objects.
is_schema_inferred bool Indicates if the schema is inferred from the schema's query expression or has been explicitly provided
definition string View's definition (if available)

Examples

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

Query the usql.views view

USE TestReferenceDB;

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

Query usql.views for multiple databases

@views =
    SELECT "TestReferenceDB" AS db, * FROM TestReferenceDB.usql.views
    UNION ALL
    SELECT "master" AS db, * FROM master.usql.views;

OUTPUT @views
TO "/ReferenceGuide/CatalogViews/views_multiple.txt"
ORDER BY db
USING Outputters.Tsv(outputHeader:true);

See Also