Skip to content

Latest commit

 

History

History
96 lines (69 loc) · 5.32 KB

join.md

File metadata and controls

96 lines (69 loc) · 5.32 KB

'Join' object (database-driven)

The Join object defines a join to another (or same) table within the logical CDC entity. The IncludeColumns and ExcludeColumns provide a shorthand to include or exclude selected columns; with the AliasColumns providing a means to rename where required.


Property categories

The Join object supports a number of properties that control the generated code output. These properties are separated into a series of logical categories.

Category Description
Key Provides the key configuration.
JoinTo Provides the join to configuration.
Database Provides the database configuration.
Columns Provides the Columns configuration.
.NET Provides the .NET configuration.
IdentifierMapping Provides the identifier mapping configuration.
Collections Provides related child (hierarchical) configuration.

The properties with a bold name are those that are more typically used (considered more important).


Key

Provides the key configuration.

Property Description
name The unique name. [Mandatory]
† A unique name is required where the same Table is referenced more than once within a logical CDC entity. However, generally, this will represent the unique name of the table within the database.
schema The schema name of the table to join.
† Defaults to Cdc.Schema; i.e. same schema.
table The name of the table to join.
† Defaults to Name. This is used to specify the actual underlying database table name (required where the Name has been changed to enable uniqueness).
alias The Schema and Table alias name.
† Will automatically default where not specified.
type The SQL join type. Valid options are: Cdc, Inner, Left, Right, Full.
† Defaults to Cdc. The Cdc value indicates this is a related secondary table (within a logical CDC entity) that also has Change Data Capture turned on and equally needs to be monitored for changes.

JoinTo

Provides the join to configuration.

Property Description
joinTo The name of the table to join to (must be previously specified).
† Defaults to parent Table.Name.
joinCardinality The join cardinality being whether there is a One-to-Many or One-to-One relationship. Valid options are: OneToMany, OneToOne.
† Defaults to OneToMany. This represents the Parent (JoinTo) to child (this) relationship.

Database

Provides the database configuration.

Property Description
cdcEnable Indicates whether to enable Cdc within the database for the tables that participate.
† Defaults to false. This option can be overridden for each underlying table referenced.
querySizeMultiplier The query size multiplier for the CDC-Join.
† Defaults to 1.0. This is applied to the execute stored procedure @MaxQuerySize parameter to allow tailoring on the join query (TOP) sizes to optimize selection. Must be greater than zero and less than or equal to 100.

Columns

Provides the Columns configuration.

Property Description
includeColumns The list of Column names to be included in the underlying generated output.
† Where not specified this indicates that all Columns are to be included.
excludeColumns The list of Column names to be excluded from the underlying generated output.
† Where not specified this indicates no Columns are to be excluded.
aliasColumns The list of Column and Alias pairs (split by a ^ lookup character) to enable column renaming.
† Each alias value should be formatted as Column + ^ + Alias; e.g. PCODE^ProductCode

.NET

Provides the .NET configuration.

Property Description
model The .NET model name.
† Defaults to Name.
property The .NET property name.
† Defaults to Model where JoinCardinality is OneToOne; otherwise, it will be the Model pluralized.
includeColumnsOnDelete The list of Column names that should be included (in addition to the primary key) for a logical delete.
† Where a column is not specified in this list its corresponding .NET property will be automatically cleared by the CdcDataOrchestrator as the data is technically considered as non-existing.
excludeColumnsFromETag The list of Column names that should be excluded from the generated ETag (used for the likes of duplicate send tracking).
† Defaults to CodeGeneration.CdcExcludeColumnsFromETag.

IdentifierMapping

Provides the identifier mapping configuration.

Property Description
identifierMapping Indicates whether to perform Identifier Mapping (mapping to GlobalId) for the primary key.
† This indicates whether to create a new GlobalId property on the entity to house the global mapping identifier to be the reference outside of the specific database realm as a replacement to the existing primary key column(s).

Collections

Provides related child (hierarchical) configuration.

Property Description
on The corresponding JoinOn collection.
mappings The corresponding JoinMapping collection.