Freigeben über


usql.tables (U-SQL)

Summary

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

Column name Data type Description
<inherited columns> For a list of columns that this view inherits, see usql.objects.
is_external bool Indicates if this is an external table
data_source_id_guid Guid Data Source ID if the table is external, otherwise null

Examples

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

Query the usql.tables view

USE TestReferenceDB;

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

Query usql.tables for multiple databases

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

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

See Also