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

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

RoleGenerated namePurpose
SourceDS_SC_large_branch_SourceJoins, filters and maps the sources
DeduplicationDS_SC_large_branch_DeduplicationRemoves duplicate rows
LoaderDS_SC_large_branch_LoaderEmpties and refills the table
StorageDS_SC_large_branchComposite table
ResultDS_SC_large_branch_ResultView read by the next model object
  • The loader is a stored procedure; DS_SC_large_branch is a table; all other objects are views.
  • The deduplication view exists only with a Deduplication Method other than None.
  • The loader and the table exist only with Cached.

The dependencies are:

Virtual: sources -> _Source -> _Deduplication -> _Result
Cached:  sources -> _Source -> _Deduplication -> _Loader
         _Loader -> DS_SC_large_branch -> _Result

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

  • Snowflake: names are in capitals, and the table of a Cached Store Composite is a transient table. The load control task DS_SC_<model object name>_TASK calls its loader. The dataflow properties Use Stream and Warehouse Placeholder Variable Name apply.
  • Databricks and Fabric Lakehouse: the loader is the notebook DS_SC_<model object name>_Loader. The properties File Format, Optimization Method and Optimization Method Columns apply.
  • Fabric Warehouse: the same objects as on Microsoft SQL Server.
  • Oracle: names are in capitals, and the loader is a PL/SQL package. Physical properties such as Partition Clause, Table Compression and tablespaces apply.

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