Skip to main content

Ordering and filtering

Component order in the Deployment tab is the order they will execute in. Get it wrong and dependent components fail.

Initial order comes from each template's <Deployment Weight="…"> attribute (see the schema reference), so with conventional weights (tables 100, functions 200, procedures 280, views 300, triggers 400, data 500) you usually don't need to touch it. Items of the same weight also follow their dependencies when the file is saved.

Items of the same weight​

Two components of one template often have the same weight, and one can depend on the other: a view whose lookup has to find another view in the target. Since 3.1.7, creating a deployment file puts each item after the items of the same weight it depends on. That happens when a file is first written from the Deployment tab, and whenever it is saved with items it was not ordered with (Save, Save As, Export to Task, and the saves the Release Workflow makes), and in the MCP manage_deployment build. The grid then shows the order that was saved.

  • Weight still decides first. Items of other weights stay exactly where they are.
  • Nothing moves unless a dependency requires it. An order you arranged by hand survives, as long as no item is ahead of something it depends on. If one is, the next time items are added or removed saving moves it back; give it a lower weight if it has to run first.
  • The dependencies are the ones Find Dependencies reports, read from the connected database. Only a data template's lookups with a ReferenceId report any, so object components stay in the order they are in.
  • Only the items in the deployment count. A dependency through a component that is not in the deployment is not followed: if A depends on B and B on C, and B is not in the deployment, A and C are not ordered.

Where the order cannot be worked out, DataStar leaves the items where they are and warns, in a notification in the app and in Warnings from MCP. Saving goes ahead either way, and saving again after you connect still works out the order.

WarningWhyWhat to do
no database is connectedDependencies come from the connected database, so nothing moves.Connect to the source database and save again.
the connected database could not answer for N component(s)The database does not hold those components, or could not be read. The items it names stay where they are, and the rest are still ordered.Connect to the database that holds them and save again, or check the order by hand.
these components depend on each otherA dependency cycle: no order satisfies them all, and a lookup may not find its row until a second run.Check the order by hand, and expect to deploy twice.

Opening or deploying a file does not reorder it. The order is decided when it is created.

Reorder by one row​

In the Deployment tab:

  • Toolbar Move Up (Alt+↑) / Move Down (Alt+↓). Moves the selected row up or down one position.
  • Right-click → Move Up / Move Down.

Reorder by drag​

Drag any row up or down in the grid.

Move to a specific position​

Use the Pos: textbox on the toolbar, then Move To. Enter the target position (1-based); the selected row moves there.

Undo / redo​

Ctrl+Z / Ctrl+Y, and toolbar Undo / Redo. Work on the most recent reorder / add / remove actions. Undoing an add also puts back the commit of each item the add moved to a newer one.

The selected rows stay selected through Move Up, Move Down, Undo and Redo, so you can press Move Up again without selecting the row again.

Filtering​

The Filter: textbox on the toolbar narrows the visible rows by searching against component paths. Rows outside the filter are hidden in the view but still included in the deployment.

Selecting and deleting​

  • Ctrl+A selects every row.
  • Delete removes the selected rows from the deployment.

Previewing before you run​

The Deployment toolbar has three preview actions:

  • What If. Dry-run preview of what the deployment would do.
  • Database Snapshot. Compare the deployment's components against the current database state.
  • SQL Export. Write the deployment out as a flat SQL script you can inspect or hand off.

Running the deployment​

The toolbar Deploy button (Ctrl+Shift+E) executes the deployment. See deployment files for the full save-and-run story.

What's next​