Skip to main content

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

AttributeTypeRequiredDefaultDescription
NamestringComponent name. Used as the output filename. May contain ${…} placeholders when paired with <DynamicQuery>.
CategorystringLogical grouping (e.g. currencies, reference-data). Appears as a folder in the UI.
SchemastringDefault schema for every <Table> unless overridden on the table itself.
VersionintTemplate format version. Set to 2 to enable advanced DELETE ordering (deletes appended at end of script, safer for tables with self-references).
DeleteEnabledbooltrueWhen true, the MERGE includes WHEN NOT MATCHED BY SOURCE THEN DELETE. When false, the script only inserts/updates.
UseWithHoldLockbooltrueInclude WITH (HOLDLOCK) on the MERGE target. Reduces deadlocks under concurrent deploys.
IncludeHashboolfalseEmit a content hash in the script header; useful for forcing VCS merge when content changes semantically but the lines are reordered.
GttSchemastringSchema for the global temp table the deploy may use (when applicable).
GttActionColumnstringName of the action column on the temp table.
GttTableSuffixstringSuffix appended to the temp table's name.
PttTablePrefixstringPrefix for the primary temp table's name.
IconColorLightstringautoIcon background colour for the light theme, in hex (e.g. #2563EB). If set without IconColorDark, also used for dark theme.
IconColorDarkstringautoIcon background colour for the dark theme, in hex (e.g. #60A5FA). If omitted, falls back to IconColorLight, or auto-generated.
IconForegroundLightstringautoIcon foreground (text) colour for the light theme, in hex. Auto-calculated from background luminance if omitted.
IconForegroundDarkstringautoIcon foreground (text) colour for the dark theme, in hex. Auto-calculated from background luminance if omitted.
ExcludeDuplicatesboolfalseWhen 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)

AttributeTypeRequiredDefaultDescription
NamestringOption name. Unchecked by schema; valid names are vendor- and feature-specific.
ValuestringOption value.

Common values:

NameValueEffect
ANSI_WARNINGSON / OFFEmits SET ANSI_WARNINGS at the top of the script.
NOCOUNTON / OFFEmits SET NOCOUNT.
DATEFORMATymd / mdy / dmyEmits SET DATEFORMAT.

Reference

Declares an ID→variable binding used for cross-component references.

Parents: DataComponent Children: (none, mixed content)

AttributeTypeRequiredDefaultDescription
IdstringReference identifier.
VariablestringThe ${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

AttributeTypeRequiredDefaultDescription
IdintLocal identifier used by <JoinTable ReferenceId="..."> to link tables. Typically 1, 2, 3.
NamestringTable name in the database.
SchemastringSchema/owner. Overrides DataComponent/@Schema.
AliasstringTable alias used in the generated SQL. Auto-generated if omitted.
InsertEnabledbooltrueWhen false, the MERGE skips WHEN NOT MATCHED BY TARGET.
UpdateEnabledbooltrueWhen false, the MERGE skips WHEN MATCHED.
DeleteEnabledboolinherits DataComponent/@DeleteEnabledPer-table override of delete behaviour.
DeleteCascadeboolfalseWhen true, deleting a parent row cascades deletes through joined child tables.
PrimaryKeyMergebooltrueWhen 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)

AttributeTypeRequiredDefaultDescription
NamestringColumn name in the database.
PrimaryKeyboolfalseColumn is part of the natural primary key. At least one PK or AlternativeKey is required per table.
AlternativeKeyboolfalseColumn is part of a portable business key used to match rows when the PK is transient. See alternative keys.
TransientboolfalseColumn's value differs across environments (e.g. identity columns). Excluded from INSERT value lists.
InsertExcludeboolfalseExclude this column from INSERT statements. Use for identity columns or server-generated values.
UpdateExcludeboolfalseExclude this column from UPDATE statements. Use for write-once columns like CREATED_DATE.
UpdateTriggerbooltrueWhen false, a difference in this column alone does not trigger an UPDATE. Use for metadata columns like UPDATED_BY.
CurrentDateCurrentDateTypeEnumUse the current time on insert/update. Values: Date, Time, DateTime.
ValuestringHard-coded value to set regardless of what's in the source.
DefaultstringDefault value if source is NULL.
IncrementintegerAmount to increment an integer column by. Useful for version counters.
GeneratorstringSQL fragment that generates a new value for this column on insert, e.g. EXEC dbo.GET_ID 'BROKER', @ID output.
CaseSensitiveboolControls whether string matching for this column is case-sensitive.
DataTypestringOverride the detected data type.
LengthintOverride the detected length.
PrecisionintOverride the detected precision.
ScaleintOverride the detected scale.
CollationstringOverride the column collation (SQL Server).
IncludebooltrueWhen false, this column is excluded entirely from extraction.
SortOrderintPosition in a compound key. Lower numbers come first.
SortDirectionSortDirectionTypeEnumAscAsc 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

AttributeTypeRequiredDefaultDescription
ReferenceIdintThe Id of the <Table> being joined to.
RelationshipRelationshipTypeEnumOneToMany, OneToOne, or ManyToOne. Controls join cardinality and cascade behaviour.
FilterOnlyboolfalseWhen true, the join is used only for filtering; no columns are pulled from the joined table.
BruteForceboolfalseWhen 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)

AttributeTypeRequiredDefaultDescription
ColumnstringColumn in the parent table.
ReferenceColumnstringColumn 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)

AttributeTypeRequiredDefaultDescription
ColumnstringColumn to filter.
OperatorOperatorEnumeqSee OperatorEnum.
ValuestringLiteral value. May contain ${…} placeholders. Omit for IS NULL / IS NOT NULL style operators.
DataTypestringOverride the literal's data type.
LengthintOverride the literal's length.
PrecisionintOverride the literal's precision.
ScaleintOverride the literal's scale.
DeployTimeboolfalse(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)

AttributeTypeRequiredDefaultDescription
ColumnstringColumn being compared to the subquery results.
OperatorOperatorEnuminUsually in or notin.
DataTypestringOverride the column's type when generating the subquery cast.
LengthintOverride the column's length.
PrecisionintOverride the column's precision.
ScaleintOverride the column's scale.
DeployTimeboolfalse(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)

AttributeTypeRequiredDefaultDescription
NotExistsboolfalseWhen true, generates NOT EXISTS(...).
DeployTimeboolfalse(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

AttributeTypeRequiredDefaultDescription
ColumnstringColumn in the lookup target table that holds the ID we want to resolve.
TablestringThe lookup target table.
SchemastringSchema of the lookup target.
AliasstringAlias used in generated SQL for the lookup join.
AsstringColumn alias in the result set.
PrefixstringPrefix applied to lookup column names in the result set.
SuffixstringSuffix applied to lookup column names in the result set.
TypestringCustom lookup type hint.
InnerbooltrueWhen true, inner-join semantics. When false, left-join.
TransientbooltrueWhen true, the lookup's own key is treated as transient.
ReferenceIdstringOptional cross-reference to a declared <Reference>.
LengthintegerOverride the result column's length.
PrecisionintOverride the result column's precision.
ScaleintOverride the result column's scale.
NullableboolfalseWhen 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)

AttributeTypeRequiredDefaultDescription
ColumnstringColumn in the lookup target used to match.
NullablebooltrueWhen false, the match fails if the source value is NULL.
LengthintOverride the matched column's length.

WhenNotFound

Action to take when a lookup doesn't resolve.

Parents: Lookup Children: IgnoreValue

AttributeTypeRequiredDefaultDescription
ActionValidationTypeEnumNone, Warn, or Error.
AssignstringValue 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

AttributeTypeRequiredDefaultDescription
DeclarationstringOptional 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

AttributeTypeRequiredDefaultDescription
TypeElementTypeEnumAttribute or Element; controls how the XPath result is extracted.
SelectstringThe XPath expression.
DeclarationstringOptional 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)

AttributeTypeRequiredDefaultDescription
BuildTimebooltrueRun this block when the script is generated.
DeployTimebooltrueInclude 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)

AttributeTypeRequiredDefaultDescription
BuildTimebooltrueRun at script-generation time.
DeployTimebooltrueInclude in the deployed script.

TempTable

Declares a temporary table used by SetUp/TearDown SQL blocks.

Parents: DataComponent Children: Column

AttributeTypeRequiredDefaultDescription
NamestringTemp table name.

Column (inside TempTable)

Simpler shape than the Column inside Table. Just the column definition for the temp table.

Parents: TempTable Children: (none)

AttributeTypeRequiredDefaultDescription
NamestringColumn name.
DataTypestringData type.
LengthintLength for string/binary types.
PrecisionintPrecision for numeric types.
ScaleintScale 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

AttributeTypeRequiredDefaultDescription
WeightintControls 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)

AttributeTypeRequiredDefaultDescription
PathstringPath relative to the workspace root.
WeightstringNegative 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.

ValueSQL equivalent
eq=
ne<>
gt>
ge>=
lt<
le<=
likeLIKE
numericNumeric comparison (ignores padding, leading zeros).
inIN (...)
notinNOT IN (...)

RelationshipTypeEnum

Join cardinality hints for <JoinTable>.

ValueMeaning
OneToOneThe join returns at most one row on each side.
OneToManyThe current table has at most one row; the joined table can have many.
ManyToOneThe current table can have many rows; the joined table has at most one.

ValidationTypeEnum

Action when a lookup doesn't resolve.

ValueBehaviour
NoneSilently use the Assign value (or NULL).
WarnLog a warning at extract time, continue.
ErrorFail the extraction.

CurrentDateTypeEnum

Auto-timestamp granularity on column inserts/updates.

ValueResolution
DateCurrent date only.
TimeCurrent time only.
DateTimeFull timestamp.

SortDirectionTypeEnum

Sort direction for compound keys.

ValueMeaning
AscAscending (default).
DescDescending.

ElementTypeEnum

How to interpret an XPath result.

ValueMeaning
AttributeXPath selects an XML attribute value.
ElementXPath selects an XML element value.

OnOffTypeEnum

Used by some <Option> values.

Value
On
Off