Skip to content
  • There are no suggestions because the search field is empty.

Store Composite

Applies to
Platform: Microsoft SQL Server · Snowflake · Databricks · Fabric Lakehouse · Fabric Warehouse · Oracle
Architecture: Data Store

A Store Composite prepares data in the Store layer with joins, filters, expressions and aggregations on Stages or other Store Composites. Use it for an intermediate result that a Store Entity or another Store Composite reads. By default it is a view; with Implementation Type Cached it is a table that each load empties and refills.

Sources and relationships

A Store Composite reads Stages and other Store Composites in exactly one dataflow. It has no relationships. A Store Entity or another Store Composite reads its result view.

Create a Store Composite

Then add joins, a where clause or expressions to the dataflow sets as the composite needs.

Properties

Default Terms

  • BG_LoadTimestamp: with Cached, the loader writes the timestamp of the load. With Virtual, the term is NULL unless you map it.
  • BG_SourceSystem: the source system of the row; empty unless you map it.

Generated objects

The part flow of Store Composite shows which parts it can get and under which settings; the legend explains the symbols.

Part flow of BusinessVault Composite, Core Composite, Mart Composite, Mart Out, RawVault Composite, Store Composite and Vault Out, top to bottom. The main path on the left, with the default settings, runs _Source, _Loader, Table, _Result. Decisions with their values, the default or main value first: Deduplication Method (None; Distinct, Partition); Implementation Type (Virtual; Cached); Create Result Views (true; false). Detours add the other parts: _Deduplication.

These are the names on Microsoft SQL Server for a Store Composite large_branch:

RoleGenerated namePurposeGenerated when
SourceDS_SC_large_branch_SourceJoins, filters and maps the sourcesAlways
DeduplicationDS_SC_large_branch_DeduplicationRemoves duplicate rowsDeduplication Method Distinct or Partition
LoaderDS_SC_large_branch_LoaderEmpties and refills the tableImplementation Type Cached
StorageDS_SC_large_branchComposite tableImplementation Type Cached
ResultDS_SC_large_branch_ResultView read by the next model objectCreate Result Views true

Generated parts of model objects shows the order in which a load runs the parts and the settings that add or remove them.

Example

The Store Composite large_branch on Microsoft SQL Server keeps only the large branches of the Stage branch. It has the default Implementation Type Virtual and maps the business terms of the Stage; BG_LoadTimestamp is not mapped. Its dataflow set has this where clause, in which s1 is the alias of the Stage:

s1.MARKET_SIZE = 'large'

The generated source view ends with:

FROM [<database name>].[stg].[STG_ST_branch_Result] AS [s1]
WHERE [s1].[MARKET_SIZE] = 'large'

<database name> is the Stage database you set before deployment, and stg is the Stage schema of the example. The Stage branch holds three branches after load 1 and two after load 2:

  • Load 1: 1 Basel large, 2 Bern small, 3 Zurich large.
  • Load 2: Zurich is deleted, and Bern changes to large.

Check the result

Query the result view, here in the schema ds:

SELECT BRANCH_ID, BRANCH_NAME, MARKET_SIZE
FROM ds.DS_SC_large_branch_Result
ORDER BY BRANCH_ID;

After load 1:

BRANCH_ID  BRANCH_NAME  MARKET_SIZE
1          Basel        large
3          Zurich       large

After load 2 of the Stage; a Virtual Store Composite has no loader:

BRANCH_ID  BRANCH_NAME  MARKET_SIZE
1          Basel        large
2          Bern         large
  • Bern appears and Zurich disappears as soon as the Stage is reloaded, because the views read the result view of the Stage.
  • With Cached, the result changes only after the loader of the Store Composite has run.

Platform differences

The rules for names, loaders, deployment, platform properties and defaults are in Model object types on each platform. The Store Composite differs from them in these points:

  • Snowflake: the table of a Cached Store Composite is a transient table, and the load control task LC_DS_SC_<model object name>_TASK calls its loader.

Limitations

  • A Store Composite has exactly one dataflow and no relationships.
  • An aggregation must be defined in all dataflow sets or in none.
  • A Store Composite keeps no history; it has no validity terms.

Related articles