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

usql.tables (U-SQL)

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

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 nameData typeDescription
<inherited columns>For a list of columns that this view inherits, see usql.objects.
is_externalboolIndicates if this is an external table
data_source_id_guidGuid?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

© 2018 Microsoft