usql.distributions (U-SQL)

Summary

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

Column name Data type Description
object_id_guid Guid Identifier of the object for which the distribution is specified
index_id int? Identifier of the index for which the distribution is specified or null if it is specified directly on the table.
distribution_type int 2 = Hash

5 = Range

6 = Round Robin

17 = Direct Hash
distribution_type_desc string HASH

RANGE

ROUND ROBIN

DIRECT HASH
distribution_count int The 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