Source Data Flow
Top-Level Source Properties
Thesources key is a top-level array in the sheet configuration YAML, alongside columns, views, formatters, and other sections.
Source Ordering
Source Ordering
The first source in the array (
sources[0]) is the primary data source for the sheet. Additional sources can define secondary entity types for multi-type configurations.Query Properties
Thequery object within each source defines how to retrieve root-level entities from Polarion.
Dynamic Where Clauses
Thewhere property supports dynamic value expressions using the () => syntax. The predicate value is evaluated at runtime, allowing queries that depend on document parameters, the current date, or other context values.
The resulting value must match the expected type for the property being filtered. For example, date comparisons require ISO 8601 format strings.
Static filter example:
Expand Properties
Theexpand array defines which related entities to load by traversing navigation properties declared in the data model relationships. Expansion paths determine the hierarchical depth of the sheet and directly control which columns can be bound to the loaded data.
Single-Level Expansion
For one-to-many (1:N) or many-to-one (N:1) relationships, a single expansion level is sufficient. N:1 example (eachUserNeed belongs to one Chapter):
chapter is a direct navigation property from the data model, loading the single parent Chapter entity for each UserNeed.
1:N example (each Chapter has many child UserNeed entities):
userNeeds is a back navigation property. The expansion creates child rows in the sheet for each related UserNeed.
Nested Expansion (Multi-Level)
For many-to-many (M:N) relationships, or when building deep hierarchies, use nestedexpand entries. M:N relationships use an association entity, so the expansion path traverses two levels: the association collection and then the target entity.
UserNeed > SystemRequirement (via M:N association) > DesignRequirement (via M:N association). Each M:N hop requires two expand levels: one for the association collection (systemRequirements) and one for the target entity (systemRequirement).
Cardinality and Expand Patterns
The relationship cardinality in the data model determines the correct expand pattern:
For comprehensive examples of each cardinality pattern with matching data model, source, and column configurations, see Cardinality.
Entity Factory
TheentityFactory object defines default property values that are automatically applied when a user creates a new entity from the sheet. This can be specified at the source level (for root entities) or within an expand entry (for child entities at that expansion level).
UserNeed entities default to severity: "medium" and status: "draft", while new association entities at the systemRequirements level default to status: "proposed".
Dynamic Entity Factory Values
Entity factory values support dynamic value expressions using the() => syntax, allowing defaults that reference document parameters or computed values:
Complete YAML Example
A full RTM (Requirements Traceability Matrix) source configuration demonstrating multi-level expansion, query filtering, and entity factories:- Queries all
UserNeedentities whereseverityis not null - Expands through the M:N relationship to
SystemRequirementvia thesystemRequirementsassociation - Further expands through the M:N relationship to
DesignRequirementvia thedesignRequirementsassociation - Sets a default
severityof"medium"for newly createdUserNeedentities
Alternative: Hazard-Based Source
A risk management source starting fromHazard entities:
Configuration Scoping
Sheet configurations (including sources) can be defined at two scopes:
Both global and project-specific configurations are discovered automatically and presented in the Administration > Nextedy Powersheet configuration interface. No default configuration is predefined; administrators must explicitly select a configuration for each document.
Interaction with Other Configuration Sections
Sources do not exist in isolation. They connect to several other sheet configuration sections:- Columns: Column binding paths (the key of each column entry) must align with the navigation properties defined in the source expansion paths. A column key like
systemRequirements.systemRequirement.titlerequires that the source expands throughsystemRequirementsand thensystemRequirement. - Views: Views override column visibility but do not change source definitions. The same sources feed all views.
- Formatters: Formatters apply conditional styling to cells. The
context.itemavailable in formatter expressions refers to entities loaded by the sources. - Sort By: Client-side sorting is applied after source data is loaded. The
columnIdinsortByentries must reference columns that are bound to source data. - Binding Syntax: The dot-notation paths used in column keys directly mirror the navigation property names from source expansion paths.
- Constraints: A source’s
query/wherefilters which root entities load at the sheet level. Restricting which items can be picked, linked, or created (or scoping a load to the current document) is defined separately as data-modelconstraints(load/pick/create), not insources. The two are independent layers that combine with AND; they are not alternative formats.
Best Practices
- Match expand to columns: Every column binding path that traverses a navigation property requires a corresponding expand entry in the source. A missing expand results in empty columns.
- Use entity factories for required fields: If the target Polarion work item type has required custom fields, set defaults in
entityFactoryto avoid save validation errors. - Limit query scope with
where: Use filter predicates to reduce the number of root entities loaded, improving sheet load performance. - Name sources descriptively: Use meaningful
idvalues (e.g.,user_needs,hazards) rather than generic names. Thetitleproperty provides the human-readable label in the UI.
Related pages: Sheet Configuration Reference | Columns | Relationships | Cardinality | Dynamic Value Expressions | Binding Syntax