2.2.5.6 Partition Object

The Partition object represents a partition in a table. It is a child of a Table object. The partitions in a table define the data from external data sources that become available when the table is queried.

The Partition object has the following properties.

Name

Type

Description

ID

unsignedLong

A reference to the object.

TableID

unsignedLong

An ID-based reference to a Table object.

Name

string

The name of the object.

Description

string

The description of the object.

DataSourceID

unsignedLong

An ID-based reference to a DataSource object.

QueryDefinition

string

The text of the query to be executed when populating data into the partition.

State

enumeration

A value that provides information about the state of the partition. The possible values and their interpretation are as follows:

  • Ready (1) – The partition is queryable and has up-to-date data.

  • NoData (3) – The partition is queryable but has no data. This state applies only to partitions with a type other than Calculated.

  • CalculationNeeded (4) – The partition is not queryable and needs to be refreshed (that is, recalculated) to become functional. This state applies only to partitions of the type Calculated.

  • SemanticError (5) The partition is in an error state because of an invalid expression and is not queryable. This state applies only to partitions of the type Calculated.

  • EvaluationError (6) – The partition is in an error state because of an error during expression evaluation. The partition is not queryable. This state applies only to partitions of the type Calculated.

  • DependencyError (7) – The partition is in an error state because some of its calculation dependencies are in an error state. The partition is not queryable. This state applies only to partitions of the type Calculated.

  • Incomplete (8) - Some parts of the partition have no data, and the partition needs to be refreshed to bring the data in. The partition is queryable. This state applies only to partitions of a type other than Calculated.

  • SyntaxError (9) - The partition is in an error state because of a syntax error in its expression. The partition is not queryable. This state applies only to partitions of the type Calculated.

Type

enumeration

The type of partition. The possible values are as follows:

  • Query (1) – The data in this partition is retrieved by executing a query against a DataSource.

  • Calculated (2) – The data in this partition is populated by executing a calculated expression.

  • None (3) – The data in this partition is populated by pushing a rowset of data to the server as part of the Refresh operation.

  • M (4) – The data in this partition is retrieved by using an M (Power Query Formula Language) expression. Compatibility level 1400 or higher is required. For more information about M, see [MSDN-PwrQFormRef].<39>

  • Entity (5) – The data in this partition is retrieved by executing a query against the named entity of the underlying data source. Compatibility level 1400 or higher is required.<40>

  • CalculationGroup (7) – The partition uses CalculationGroup as a source. Compatibility level 1500 or higher is required.<41>

PartitionStorageID

unsignedLong

An ID-based reference to a PartitionStorage object. The PartitionStorage object is reserved for internal use only.

Mode

enumeration

Defines the method for making data available in the partition. The possible values are as follows:

  • Import (0) – Data is imported from a data source.

  • DirectQuery (1) – Data is queried dynamically from a data source.<42>

  • Default (2) - Only partitions can use this value. When set, the partition inherits the DefaultMode of the Model.

  • Push (3) – Data is pushed into the partition.

DataView

enumeration

The value that determines which partitions are selected for use in queries that are run against the Model object. The possible values are as follows:

  • Full (0) – Partitions with DataView set to "Default" or "Full" are selected.

  • Sample (1) – Partitions with DataView set to "Default" or "Sample" are selected.

  • Default (3) – The default DataView of the Model object is inherited.

ModifiedTime

dateTime

The time that the object was last modified.

RefreshedTime

dateTime

The time that the object was last refreshed.

SystemFlags

long

A bitmask used to identify the type of object. The possible values are as follows:

  • Bit 0 is set to 1: The object is a partition that belongs to a system table that is not accessible to users through data definition language (DDL).

  • Bit 1 is set to 1: The object is a partition that belongs to a calculated table.

ErrorMessage

string

The string that explains the error state associated with the current object. It is set by the engine only when the state of the object is one of these three values: SemanticError, DependencyError, or EvaluationError.

This element applies only to partitions of the type Calculated.

RetainDataTillForceCalculate<43>

boolean

A Boolean that indicates whether a calculated partition is allowed to contain data that is not affected by a RefreshCalculate command when only data changes have been made.

Compatibility level 1400 or higher is required.

QueryGroupID<44>

unsignedLong

An ID-based reference to a QueryGroup object.

Compatibility level 1500 or higher is required.

ExpressionSourceID<45>

unsignedLong

An ID-based reference to an Expression object.

Compatibility level 1600 or higher is required.

MAttributes<46>

string

A set of optional properties that can be used to define the literal attributes on the section members of the M queries. This set of properties is meaningful only if the type of the partition is M.

Compatibility level 1600 or higher is required.