The Table object enables the definition of the primary table, one-or-more child tables and their respective join relationships, to enable Change Data Capture (CDC) event publishing. The IncludeColumns and ExcludeColumns provide a shorthand to include or exclude selected columns; with the AliasColumns providing a means to rename where required.
The Table 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. |
Columns |
Provides the Columns configuration. |
Database |
Provides the database configuration. |
.NET |
Provides the .NET configuration. |
Event |
Provides the event configuration. |
Infer |
Provides the special Column Name inference 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).
Provides the key configuration.
| Property | Description |
|---|---|
name |
The name of the primary table. [Mandatory] |
schema |
The default schema name used where not otherwise explicitly specified. † Defaults to Root.Schema. |
table |
The name of the primary table. † 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 table alias name (must be unique). † Will automatically default where not specified; for example a table named Person will default to p. |
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 aliasing/renaming.† Each alias value should be formatted as Column + ^ + Alias; e.g. PCODE^ProductCode. |
Provides the database configuration.
| Property | Description |
|---|---|
executeStoredProcedure |
The CDC execute batch stored procedure name.† Defaults to sp (literal) + Name + BatchExecute (literal); e.g. spNameBatchExecute. |
completeStoredProcedure |
The CDC complete batch stored procedure name.† Defaults to sp (literal) + Name + BatchComplete (literal); e.g. spNameBatchComplete. |
resetStoredProcedure |
The CDC reset batch stored procedure name.† Defaults to sp (literal) + Name + BatchReset (literal); e.g. spNameBatchReset. |
trackingStoredProcedure |
The CDC tracking (Sidecar only) batch stored procedure name.† Defaults to sp (literal) + Name + BatchTracking (literal); e.g. spNameBatchTracking. |
cdcSchema |
The schema name for the generated CDC-related database artefacts.† Defaults to Root.CdcSchema. |
batchTrackingTable |
The corresponding CDC Batch tracking table name.† Defaults to Name + BatchTracking (literal). |
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. |
Provides the .NET configuration.
| Property | Description |
|---|---|
model |
The .NET model name. † Defaults to Name. |
orchestratorCtorParams |
The list of additional (non-default) Dependency Injection (DI) parameters for the generated CDC Orchestrator constructor.† Each constructor parameter should be formatted as Type + ^ + Name; e.g. IConfiguration^Config. Where the Name portion is not specified it will be inferred. |
database |
The .NET database IDatabase Type name used in the constructor for Dependency Injection (DI).† Defaults to IDatabase. |
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 Root.CdcExcludeColumnsFromETag. |
tenantIdColumns |
The list of Column names that represent the tenant identifier. |
partitionKey |
The partition key. † A partition key can be specified using either PartitionKey or PartitionKeyColumns. |
partitionKeyColumns |
The list of Column names that represent the partition key.† A partition key can be specified using either PartitionKey or PartitionKeyColumns. |
Provides the event configuration.
| Property | Description |
|---|---|
eventSource |
The Event Source. † Defaults to Schema + / (literal) + Name (as lowercase). Note: when used in code-generation the Root.EventSourceRoot will be prepended where specified. |
eventSourceFormat |
The default formatting for the Source when an Event is published. Valid options are: NameOnly, NameAndKey, NameAndTableKey.† Defaults to Root.EventSourceFormat. |
eventSubject |
The Event Subject. † Defaults to ModelName. Note: when used in code-generation the Root.EventSubjectRoot will be prepended where specified. |
eventSubjectFormat |
The default formatting for the Subject when an Event is published. Valid options are: NameOnly, NameAndKey, NameAndTableKey.† Defaults to Root.EventSubjectFormat. |
eventType |
The Event Type. † Defaults to ModelName. Note: when used in code-generation the Root.EventTypeRoot will be prepended where specified. |
Provides the special Column Name inference configuration.
| Property | Description |
|---|---|
isDeletedColumn |
The column name for the IsDeleted (logical delete) capability (if any).† Defaults to Root.ColumnIsDeleted. |
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). |
Provides related child (hierarchical) configuration.
| Property | Description |
|---|---|
joins |
The corresponding Join collection.† A Join object provides the configuration for a table join. |
where |
The corresponding Where collection.† A Where object provides the configuration for a table where clause. |
mappings |
The corresponding TableMapping collection. |