ntangle
NTangle CDC code-generation configuration. Documentation: https://github.com/Avanade/ntangle
| File match |
ntangle.yaml
ntangle.yml
ntangle.json
ntangle.jsn
|
|---|---|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/ntangle/latest.json |
| Source | https://raw.githubusercontent.com/Avanade/NTangle/main/schemas/ntangle.json |
Validate with Lintel
npx @lintel/lintel check
All of
Definitions
The RootConfig object defines the global properties that are used to drive the underlying database-driven CDC-oriented code-generation.
This is used as the default Schema for all child objects. Defaults to dbo (literal).
Defaults to NTangle (literal).
Defaults to false.
Defaults to VersionTracking (literal).
Defaults to false. This option can be overridden for each underlying table referenced.
Where set to true each underlying Table and corresponding Join must set IdentifierMapping explicitly.
Defaults to String.
Defaults to IdentifierMapping (literal).
Defaults to spIdentifierMappingCreate (literal).
Defaults to IsDeleted.
Defaults to SnakeKebabToPascalCase which will remove any underscores or hyphens separating each word and capitalize the first character of each; e.g. internal-customer_id would be renamed as InternalCustomerId. The PascalCase option will capatilize the first character only.
Defaults to SystemText.
Defaults to None. A HostedService is an IHostedService implementation enabling long-running execution; whereas, Service is intended for self-managed execution.
Used to enable the sending of messages to the likes of EventHubs, Service Broker, Kafka, etc.
Defaults to NameOnly.
Defaults to None (no formatting required, i.e. as-is).
Defaults to Relative (being a relative path).
The event source is only updated where an EventSourceKind is not None.
Defaults to NameAndTableKey (being the child Cdc.ModelName appended with the corresponding table key).
Used to enable the sending of messages to the likes of EventHubs, Service Broker, Kafka, etc. Defaults to EventSubjectRoot.
Defaults to false.
Defaults to Outbox (literal).
Defaults to false.
Defaults to EventOutbox (literal).
Defaults to spEventOutboxEnqueue (literal).
Defaults to spEventOutboxDequeue (literal).
Defaults to AppName (runtime parameter). For example Avanade.Application.
Defaults to PathBase + .Database (literal). For example Avanade.Application.Database.
Defaults to PathDatabase + /Schema (literal). For example Avanade.Application.Database/Schema.
Defaults to PathDatabase + /Migrations (literal). For example Avanade.Application.Database/Migrations.
Defaults to PathBase + .Publisher (literal). For example Avanade.Application.Publisher.
Defaults to PathBase + .SidecarDb (literal). For example Avanade.Application.SidecarDb.
Defaults to PathSidecarDatabase + /Schema (literal). For example Avanade.Application.SidecarDb/Schema.
Defaults to PathSidecarDatabase + /Migrations (literal). For example Avanade.Application.SidecarDb/Migrations.
Defaults to AppName (runtime parameter). For example Avanade.Application.
Defaults to NamespaceBase + .Publisher (literal). For example Avanade.Application.Publisher.
Defaults to NamespacePublisher.
A Table object provides the primary database table configuration for Change Data Capture (CDC), including multiple child table joins to form a composite entity.
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.
Defaults to Root.Schema.
Defaults to Name. This is used to specify the actual underlying database table name (required where the Name has been changed to enable uniqueness).
Will automatically default where not specified; for example a table named Person will default to p.
Where not specified this indicates that all Columns are to be included.
Where not specified this indicates no Columns are to be excluded.
Each alias value should be formatted as Column + ^ + Alias; e.g. PCODE^ProductCode.
Defaults to sp (literal) + Name + BatchExecute (literal); e.g. spNameBatchExecute.
Defaults to sp (literal) + Name + BatchComplete (literal); e.g. spNameBatchComplete.
Defaults to sp (literal) + Name + BatchReset (literal); e.g. spNameBatchReset.
Defaults to sp (literal) + Name + BatchTracking (literal); e.g. spNameBatchTracking.
Defaults to Root.CdcSchema.
Defaults to Name + BatchTracking (literal).
Defaults to false. This option can be overridden for each underlying table referenced.
Defaults to Name.
Each constructor parameter should be formatted as Type + ^ + Name; e.g. IConfiguration^Config. Where the Name portion is not specified it will be inferred.
Defaults to IDatabase.
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.
Defaults to Root.Service. A HostedService is an IHostedService implementation enabling long-running execution; whereas, Service is intended for self-managed execution.
Defaults to Root.CdcExcludeColumnsFromETag.
A partition key can be specified using either PartitionKey or PartitionKeyColumns.
A partition key can be specified using either PartitionKey or PartitionKeyColumns.
Defaults to Schema + / (literal) + Name (as lowercase). Note: when used in code-generation the Root.EventSourceRoot will be prepended where specified.
Defaults to Root.EventSourceFormat.
Defaults to ModelName. Note: when used in code-generation the Root.EventSubjectRoot will be prepended where specified.
Defaults to Root.EventSubjectFormat.
Defaults to ModelName. Note: when used in code-generation the Root.EventTypeRoot will be prepended where specified.
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).
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).
Defaults to Root.ColumnIsDeleted.
A Join object provides the configuration for a table join.
A Where object provides the configuration for a table where clause.
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.
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.
Defaults to Cdc.Schema; i.e. same schema.
Defaults to Name. This is used to specify the actual underlying database table name (required where the Name has been changed to enable uniqueness).
Will automatically default where not specified.
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.
Defaults to parent Table.Name.
Defaults to OneToMany. This represents the Parent (JoinTo) to child (this) relationship.
Defaults to false. This option can be overridden for each underlying table referenced.
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.
Where not specified this indicates that all Columns are to be included.
Where not specified this indicates no Columns are to be excluded.
Each alias value should be formatted as Column + ^ + Alias; e.g. PCODE^ProductCode
Defaults to Name.
Defaults to Model where JoinCardinality is OneToOne; otherwise, it will be the Model pluralized.
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.
Defaults to CodeGeneration.CdcExcludeColumnsFromETag.
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).
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).
The JoinOn object defines the join on characteristics for a Join object.
Defaults to Name; i.e. assumes same name.
The JoinMapping object defines one or more related table identifier mappings.
Defaults to the owning (parent) table schema.
This should only be used where the column value is largely immutable; otherwise, unintended side-effects may occur. NTangle uses the condition explictily and does not attempt to handle value change to infer creation or deletion of data as a result of the underlying change; as such, this should be used cautiously. Note that the where is applied when querying the cdc.fn_cdc_get_all_changes_... function, not the underlying table itself.
The column name.
This enables statements such as WHERE (COL IS NULL) or WHERE (COL IS NULL OR COL = VALUE) (where .
Defaults to EQ where Value is specified.
This must be valid formatted/escaped SQL.
The TableMapping object defines one or more related table identifier mappings.
Defaults to the owning (parent) table schema.