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

usql.partition_parameters (U-SQL)

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

Provides details about the partition parameters for the partition schemes in the schemas of the current database context. The partitioned table must contain at least one record.

Column nameData typeDescription
object_id_guidGuidIdentifier of the object on which the partition is specified.
index_idintIdentifier of the index for which the partition is specified.
parameter_idintOrdinal position (starting at 1) of the parameter (unique within a partition scheme).
column_idintOrdinal position of the column in the partition scheme


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

Query the usql.partitions view

USE TestReferenceDB;

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

Query the usql.partition_parameters view with other views

@partition_parameters =
    SELECT AS tableName,
   AS columnName,
    FROM usql.partitions AS p
    JOIN usql.objects AS o
    ON p.object_id_guid == o.object_id_guid
    JOIN usql.partition_parameters AS pp
    ON p.object_id_guid == pp.object_id_guid
    JOIN usql.columns AS c
    ON o.object_id_guid == c.object_id_guid
    AND pp.column_id == c.column_id;

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

See Also

© 2018 Microsoft