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

usql.distributions (U-SQL)

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

Contains one row per distribution scheme for the tables in the schemas of the current database context.

Column nameData typeDescription
object_id_guidGuidIdentifier of the object for which the distribution is specified
index_idint?Identifier of the index for which the distribution is specified or null if it is specified directly on the table.
distribution_typeint2 = Hash

5 = Range

6 = Round Robin

17 = Direct Hash
distribution_type_descstringHASH

RANGE

ROUND ROBIN

DIRECT HASH
distribution_countintThe specified count of distribution buckets if specified, null or 0 otherwise

Examples

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

Query the usql.distributions view

USE TestReferenceDB;

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

Query the usql.distributions view with usql.objects view

@distributions =
    SELECT o.name AS objectName,
            d.*
    FROM usql.distributions AS d
    JOIN usql.objects AS o
    ON d.object_id_guid == o.object_id_guid;

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

See Also

© 2018 Microsoft