Data component schema
Complete reference for DataComponent.xsd, the schema that drives row-level data extraction and deployment. Every element, every attribute, with types, defaults, and descriptions.
For the conceptual guide see Create a data component template. This page is the exhaustive lookup.
Element tree
DataComponent (root)
├── Option* : name/value configuration
├── SetUp* : SQL run before extract/deploy
├── TempTable*
│ └── Column+ : temp-table column definition
├── Table+ : tables the component reads from
│ ├── Option*
│ ├── Column* : column overrides
│ │ ├── Lookup* : FK resolution (mutually exclusive with XmlColumn)
│ │ │ ├── Criteria+
│ │ │ ├── Filters?
│ │ │ └── WhenNotFound?
│ │ │ └── IgnoreValue*
│ │ └── XmlColumn? : XML payload column
│ │ ├── Option*
│ │ └── Xpath*
│ │ ├── Lookup* | Xpath*
│ ├── JoinTable* : join to another table in the same component
│ │ └── JoinColumn+
│ └── Filters?
│ ├── Value*
│ ├── SubQuery*
│ └── Exists*
├── TearDown* : SQL run after extract/deploy
├── DynamicQuery* : bulk-generation driver query
├── Reference*
└── Deployment?
└── Script* : pre/post static scripts
Legend: ? = optional, * = zero or more, + = one or more, (default: X) = attribute default.
Root element
DataComponent
Root element. Defines a template that generates one re-runnable MERGE script per component.
Parents: (root)
Children: Option, SetUp, TempTable, Table, TearDown, DynamicQuery, Reference, Deployment
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Name | string | ✓ | – | Component name. Used as the output filename. May contain ${…} placeholders when paired with <DynamicQuery>. |
Category | string | ✓ | – | Logical grouping (e.g. currencies, reference-data). Appears as a folder in the UI. |
Schema | string | – | – | Default schema for every <Table> unless overridden on the table itself. |
Version | int | – | – | Template format version. Set to 2 to enable advanced DELETE ordering (deletes appended at end of script, safer for tables with self-references). |
DeleteEnabled | bool | – | true | When true, the MERGE includes WHEN NOT MATCHED BY SOURCE THEN DELETE. When false, the script only inserts/updates. |
UseWithHoldLock | bool | – | true | Include WITH (HOLDLOCK) on the MERGE target. Reduces deadlocks under concurrent deploys. |
IncludeHash | bool | – | false | Emit a content hash in the script header; useful for forcing VCS merge when content changes semantically but the lines are reordered. |
GttSchema | string | – | – | Schema for the global temp table the deploy may use (when applicable). |
GttActionColumn | string | – | – | Name of the action column on the temp table. |
GttTableSuffix | string | – | – | Suffix appended to the temp table's name. |
PttTablePrefix | string | – | – | Prefix for the primary temp table's name. |
IconColorLight | string | – | auto | Icon background colour for the light theme, in hex (e.g. #2563EB). If set without IconColorDark, also used for dark theme. |
IconColorDark | string | – | auto | Icon background colour for the dark theme, in hex (e.g. #60A5FA). If omitted, falls back to IconColorLight, or auto-generated. |
IconForegroundLight | string | – | auto | Icon foreground (text) colour for the light theme, in hex. Auto-calculated from background luminance if omitted. |
IconForegroundDark | string | – | auto | Icon foreground (text) colour for the dark theme, in hex. Auto-calculated from background luminance if omitted. |
ExcludeDuplicates | bool | – | false | When true, duplicate components (same filename from a dynamic query) are silently excluded instead of flagged as errors. Duplicates already on the file system still appear with an Excluded status and cannot be pulled; duplicates not on disk are hidden entirely. A warning-level log entry is written for each excluded duplicate. See handling duplicates. |
Configuration
Option
Arbitrary name/value pair. Valid at root and at <Table> level (scope differs).
Parents: DataComponent, Table, XmlColumn
Children: (none)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Name | string | ✓ | – | Option name. Unchecked by schema; valid names are vendor- and feature-specific. |
Value | string | ✓ | – | Option value. |
Common values:
Name | Value | Effect |
|---|---|---|
ANSI_WARNINGS | ON / OFF | Emits SET ANSI_WARNINGS at the top of the script. |
NOCOUNT | ON / OFF | Emits SET NOCOUNT. |
DATEFORMAT | ymd / mdy / dmy | Emits SET DATEFORMAT. |
Reference
Declares an ID→variable binding used for cross-component references.
Parents: DataComponent
Children: (none, mixed content)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Id | string | ✓ | – | Reference identifier. |
Variable | string | ✓ | – | The ${variable} substituted when this reference is resolved. |
Table definition
Table
Declares a table the component reads from. At least one is required.
Parents: DataComponent
Children: Option, Column, JoinTable, Filters
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Id | int | ✓ | – | Local identifier used by <JoinTable ReferenceId="..."> to link tables. Typically 1, 2, 3. |
Name | string | ✓ | – | Table name in the database. |
Schema | string | – | – | Schema/owner. Overrides DataComponent/@Schema. |
Alias | string | – | – | Table alias used in the generated SQL. Auto-generated if omitted. |
InsertEnabled | bool | – | true | When false, the MERGE skips WHEN NOT MATCHED BY TARGET. |
UpdateEnabled | bool | – | true | When false, the MERGE skips WHEN MATCHED. |
DeleteEnabled | bool | – | inherits DataComponent/@DeleteEnabled | Per-table override of delete behaviour. |
DeleteCascade | bool | – | false | When true, deleting a parent row cascades deletes through joined child tables. |
PrimaryKeyMerge | bool | – | true | When true, the MERGE matches on primary-key columns. Set false if you want to match only on alternative keys. |
Column (inside Table)
Column-level override. You only declare columns where default behaviour needs changing; untouched columns are picked up automatically.
Parents: Table
Children: Lookup or XmlColumn (mutually exclusive)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Name | string | ✓ | – | Column name in the database. |
PrimaryKey | bool | – | false | Column is part of the natural primary key. At least one PK or AlternativeKey is required per table. |
AlternativeKey | bool | – | false | Column is part of a portable business key used to match rows when the PK is transient. See alternative keys. |
Transient | bool | – | false | Column's value differs across environments (e.g. identity columns). Excluded from INSERT value lists. |
InsertExclude | bool | – | false | Exclude this column from INSERT statements. Use for identity columns or server-generated values. |
UpdateExclude | bool | – | false | Exclude this column from UPDATE statements. Use for write-once columns like CREATED_DATE. |
UpdateTrigger | bool | – | true | When false, a difference in this column alone does not trigger an UPDATE. Use for metadata columns like UPDATED_BY. |
CurrentDate | CurrentDateTypeEnum | – | – | Use the current time on insert/update. Values: Date, Time, DateTime. |
Value | string | – | – | Hard-coded value to set regardless of what's in the source. |
Default | string | – | – | Default value if source is NULL. |
Increment | integer | – | – | Amount to increment an integer column by. Useful for version counters. |
Generator | string | – | – | SQL fragment that generates a new value for this column on insert, e.g. EXEC dbo.GET_ID 'BROKER', @ID output. |
CaseSensitive | bool | – | – | Controls whether string matching for this column is case-sensitive. |
DataType | string | – | – | Override the detected data type. |
Length | int | – | – | Override the detected length. |
Precision | int | – | – | Override the detected precision. |
Scale | int | – | – | Override the detected scale. |
Collation | string | – | – | Override the column collation (SQL Server). |
Include | bool | – | true | When false, this column is excluded entirely from extraction. |
SortOrder | int | – | – | Position in a compound key. Lower numbers come first. |
SortDirection | SortDirectionTypeEnum | – | Asc | Asc or Desc. |
JoinTable
Declares a join from this table to another table in the same component. Joins to external tables are done via <Lookup>.
Parents: Table
Children: JoinColumn
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
ReferenceId | int | ✓ | – | The Id of the <Table> being joined to. |
Relationship | RelationshipTypeEnum | – | – | OneToMany, OneToOne, or ManyToOne. Controls join cardinality and cascade behaviour. |
FilterOnly | bool | – | false | When true, the join is used only for filtering; no columns are pulled from the joined table. |
BruteForce | bool | – | false | When true, skip join-optimiser hints. Use only when the optimiser is making the wrong choice. |
JoinColumn
One pair of columns in a join. Multiple JoinColumn elements create a compound join.
Parents: JoinTable
Children: (none)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Column | string | ✓ | – | Column in the parent table. |
ReferenceColumn | string | ✓ | – | Column in the joined table. |
Filtering
Filters
Restricts which rows are extracted. Appears inside <Table> and inside <Lookup>.
Parents: Table, Lookup
Children: Value, SubQuery, Exists
Value
Equality / comparison filter against a literal.
Parents: Filters
Children: (none)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Column | string | ✓ | – | Column to filter. |
Operator | OperatorEnum | – | eq | See OperatorEnum. |
Value | string | – | – | Literal value. May contain ${…} placeholders. Omit for IS NULL / IS NOT NULL style operators. |
DataType | string | – | – | Override the literal's data type. |
Length | int | – | – | Override the literal's length. |
Precision | int | – | – | Override the literal's precision. |
Scale | int | – | – | Override the literal's scale. |
DeployTime | bool | – | false | (Lookup-scope only) When true, the filter is applied at deploy time instead of extract time. |
SubQuery
Mixed-content element: the SQL subquery goes inside as text. Used as an IN (...) / NOT IN (...) clause.
Parents: Filters
Children: (text content only)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Column | string | ✓ | – | Column being compared to the subquery results. |
Operator | OperatorEnum | – | in | Usually in or notin. |
DataType | string | – | – | Override the column's type when generating the subquery cast. |
Length | int | – | – | Override the column's length. |
Precision | int | – | – | Override the column's precision. |
Scale | int | – | – | Override the column's scale. |
DeployTime | bool | – | false | (Lookup-scope only) Apply at deploy time. |
Exists
Mixed-content element: the SQL predicate goes inside. Generates EXISTS(...) or NOT EXISTS(...).
Parents: Filters
Children: (text content only)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
NotExists | bool | – | false | When true, generates NOT EXISTS(...). |
DeployTime | bool | – | false | (Lookup-scope only) Apply at deploy time. |
Lookups
Lookup
Resolves a transient foreign-key value via a business key. See lookups for the conceptual guide.
Parents: Column (inside Table), Xpath
Children: Criteria, Filters, WhenNotFound
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Column | string | ✓ | – | Column in the lookup target table that holds the ID we want to resolve. |
Table | string | ✓ | – | The lookup target table. |
Schema | string | – | – | Schema of the lookup target. |
Alias | string | – | – | Alias used in generated SQL for the lookup join. |
As | string | – | – | Column alias in the result set. |
Prefix | string | – | – | Prefix applied to lookup column names in the result set. |
Suffix | string | – | – | Suffix applied to lookup column names in the result set. |
Type | string | – | – | Custom lookup type hint. |
Inner | bool | – | true | When true, inner-join semantics. When false, left-join. |
Transient | bool | – | true | When true, the lookup's own key is treated as transient. |
ReferenceId | string | – | – | Optional cross-reference to a declared <Reference>. |
Length | integer | – | – | Override the result column's length. |
Precision | int | – | – | Override the result column's precision. |
Scale | int | – | – | Override the result column's scale. |
Nullable | bool | – | false | When true, a NULL result from the lookup is allowed; when false (default), a missing match triggers the WhenNotFound handling. Not to be confused with the per-Criteria Nullable flag, which controls match behaviour for each criterion independently. |
Criteria
One match criterion in a lookup. Multiple criteria form a compound match.
Parents: Lookup
Children: (none)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Column | string | ✓ | – | Column in the lookup target used to match. |
Nullable | bool | – | true | When false, the match fails if the source value is NULL. |
Length | int | – | – | Override the matched column's length. |
WhenNotFound
Action to take when a lookup doesn't resolve.
Parents: Lookup
Children: IgnoreValue
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Action | ValidationTypeEnum | ✓ | – | None, Warn, or Error. |
Assign | string | – | – | Value to substitute when the lookup fails (only meaningful with Action="None"). |
IgnoreValue
One value that's explicitly allowed to fail the lookup silently. Text-content element.
Parents: WhenNotFound
Children: (text content: the ignored value)
XML columns
XmlColumn
Models a column that contains XML, allowing individual paths inside the XML to be extracted or looked up.
Parents: Column (inside Table)
Children: Option, Xpath
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Declaration | string | – | – | Optional XML namespace declaration prefixed to every XPath expression. |
Xpath
One XPath into an XML column. May itself contain nested <Xpath> or <Lookup> children.
Parents: XmlColumn, Xpath
Children: Lookup or Xpath
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Type | ElementTypeEnum | ✓ | – | Attribute or Element; controls how the XPath result is extracted. |
Select | string | ✓ | – | The XPath expression. |
Declaration | string | – | – | Optional namespace declaration for this expression. |
Lifecycle and generation
SetUp
Mixed-content element: SQL block that runs before the data operations.
Parents: DataComponent
Children: (text content: the SQL)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
BuildTime | bool | – | true | Run this block when the script is generated. |
DeployTime | bool | – | true | Include this block in the deployed script so it runs at deploy time. |
TearDown
Mixed-content element: SQL block that runs after the data operations. Same shape as SetUp.
Parents: DataComponent
Children: (text content: the SQL)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
BuildTime | bool | – | true | Run at script-generation time. |
DeployTime | bool | – | true | Include in the deployed script. |
TempTable
Declares a temporary table used by SetUp/TearDown SQL blocks.
Parents: DataComponent
Children: Column
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Name | string | ✓ | – | Temp table name. |
Column (inside TempTable)
Simpler shape than the Column inside Table. Just the column definition for the temp table.
Parents: TempTable
Children: (none)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Name | string | ✓ | – | Column name. |
DataType | string | ✓ | – | Data type. |
Length | int | – | – | Length for string/binary types. |
Precision | int | – | – | Precision for numeric types. |
Scale | int | – | – | Scale for numeric types. |
DynamicQuery
Text-content element: the SQL query whose result rows drive bulk generation. Each row becomes one generated component. Column aliases in the SELECT become ${placeholder} variables usable anywhere else in the template. See Generate components in bulk.
Parents: DataComponent
Children: (text content: the SQL)
Deployment
Deployment
Deployment ordering and pre/post static scripts.
Parents: DataComponent
Children: Script
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Weight | int | ✓ | – | Controls deployment order. Lower weights deploy first. Conventional scheme: tables 100, functions 200, views 300, triggers 400, data 500. |
Script
A static SQL script to run before or after this component during deployment.
Parents: Deployment
Children: (none)
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
Path | string | ✓ | – | Path relative to the workspace root. |
Weight | string | ✓ | – | Negative numbers (-1, -2, …) run before the component; positive (+1, +2, …) after. |
See Include static scripts for the full pattern.
Enumerations
OperatorEnum
Filter and lookup operators.
| Value | SQL equivalent |
|---|---|
eq | = |
ne | <> |
gt | > |
ge | >= |
lt | < |
le | <= |
like | LIKE |
numeric | Numeric comparison (ignores padding, leading zeros). |
in | IN (...) |
notin | NOT IN (...) |
RelationshipTypeEnum
Join cardinality hints for <JoinTable>.
| Value | Meaning |
|---|---|
OneToOne | The join returns at most one row on each side. |
OneToMany | The current table has at most one row; the joined table can have many. |
ManyToOne | The current table can have many rows; the joined table has at most one. |
ValidationTypeEnum
Action when a lookup doesn't resolve.
| Value | Behaviour |
|---|---|
None | Silently use the Assign value (or NULL). |
Warn | Log a warning at extract time, continue. |
Error | Fail the extraction. |
CurrentDateTypeEnum
Auto-timestamp granularity on column inserts/updates.
| Value | Resolution |
|---|---|
Date | Current date only. |
Time | Current time only. |
DateTime | Full timestamp. |
SortDirectionTypeEnum
Sort direction for compound keys.
| Value | Meaning |
|---|---|
Asc | Ascending (default). |
Desc | Descending. |
ElementTypeEnum
How to interpret an XPath result.
| Value | Meaning |
|---|---|
Attribute | XPath selects an XML attribute value. |
Element | XPath selects an XML element value. |
OnOffTypeEnum
Used by some <Option> values.
| Value |
|---|
On |
Off |