Skip to main content

Data vs object components

DataStar has two kinds of template. Before you create one, you need to know which you're after.

The difference in one line

  • A data component template describes how to extract and deploy rows in a table: configuration, reference data, lookup values.
  • An object component template describes how to extract and deploy database objects: tables, views, stored procedures, functions, triggers.

What each one generates

A re-runnable script that reconciles the source rows with the target table using a MERGE (or equivalent) statement, wrapped in a transaction with a metadata header and a change-summary output. Environment-agnostic and re-runnable; identity keys are resolved at deploy time via alternative keys and lookups, so you never ship transient IDs between environments.

How to choose

You're working with…Pick
Rows in a configuration, reference, or lookup tableData component
A table structure (columns, constraints, indexes)Object component (type Table)
A view, stored procedure, function, or triggerObject component
A hand-written script that runs once (DDL migration, data fix)Neither; use a static script

Most workspaces use both: object components for the schema, data components for the rows, and a handful of static scripts for one-off fixes.

Template files

Both kinds are XML files. They differ by the root element:

data-component.xml
<DataComponent Name="..." Category="..." DeleteEnabled="true">
<Table Id="1" Name="...">
...
</Table>
</DataComponent>
object-component.xml
<ObjectComponent Name="..." Category="..." Schema="...">
<SchemaObject Name="..." Type="View"/>
</ObjectComponent>

Each has its own XSD, so a text editor with schema support will autocomplete the right elements for you.

Where to next