Application Programming Interface Guide > Built-in Procedures > Procedures Reference > GetPartitionClauses
 
GetPartitionClauses
Retrieve the partition SQL clauses (predicates) to be used in order to define partition queries against the specified published table using the specified column. Cardinality statistics must be enabled and gathered on the data source to enable gathering of profiling information. Please note that the table or view may have underlying procedures and partition clauses can be got for such views if cardinality statistics are enabled. This procedure is present in “/services/databases/system/profile/GetPartitionClauses”.
When a published resource has an underlying view, caching and cardinality statistics must be enabled and gathered before using the profile APIs. Enabling cardinality statistics at the data source level may not be sufficient in gathering profile information.
Inputs
database: The name of the published database to which the partition column belongs. This parameter is required.
catalog: The name of the published catalog to which the partition column belongs. This parameter is optional (i.e. it may be set to NULL to denote no catalog).
schema: The name of the published schema to which the partition column belongs. This parameter is optional (i.e. it may be set to NULL to denote no schema).
table: The name of the published table to which the partition column belongs. This parameter is required.
column: The name of the partition column. This parameter is required.
partitionCount: A numeric value indicating the desired number of partitions. This parameter is optional.
nullsFirst: A boolean value indicating whether NULL values should be returned by the first partition clause or the last.
Outputs
A cursor whose rows encode partition SQL clauses (predicates), having the following columns:
partitionClause: The SQL-encoded partition clause to be used in order to retrieve a partition.
Exceptions:
IllegalArgumentException: If the specified resources cannot be found or the values of the specified column cannot be partitioned or access to the specified set of column values is not allowed.