Save, load and share repository definitions
On this page
- Recommended exchange procedure
- Test results included in project exchange
- Object conflicts and reuse modes
- Mapping sources, tables and dependent references
- Import and Export package field mappings
- Source Constraints in project exchange
- Owner decisions on exchange policy
- Historization and Persisting operations in project exchange
Project exchange serializes repository definitions for reuse, while database backup remains a separate operational concern.
The File menu exposes Save project / Load project, Save to file / Load from file and cloud commands. Object-level export/import commands also exist. These routes have different scopes; inspect the selected command, object and file before importing.
Recommended exchange procedure
- Save editor changes and identify the intended repository/object scope.
- Export to a new file and keep the original repository available.
- Review the exported content for connection information and sensitive metadata.
- Load into a demonstration repository first.
- Inspect object names, cross-object references, settings and generated definitions.
- Synchronize and validate as appropriate before deployment.
The exchange model contains comparison and mapping logic for many repository object types, including connectors, tests and dependent definitions. Loading is not a text-only preview and can change metadata. Do not equate an exported project with a SQL Server backup containing warehouse data.
Cloud operations require the configured backend/account and are explicit uploads/downloads. Review exported content for credentials before sharing it.
The precise intended long-term interchange/version-compatibility policy requires owner confirmation. Keep versioned copies and test round-trips before replacing a production repository.
Test results included in project exchange
The full repository export constructs each test with its input/expected definitions and all associated historical log entries. It also copies the test's latest Log and Errors fields. Historical entries carry Date, User, Success, Errors, serialized Log and IsBatch. This is stored result data, not a rerun of the test on import.
A project containing tests can therefore contain returned data rows and error details as well as definitions. Review that content before sharing. The inspected test constructor does not apply a date or latest-only filter to its historical logs. This scope describes full repository exchange; do not assume every object-level export command selects the same tests.
Reusing tests and historical entries
The default test reuse mode is use-if-match. The parent test comparison checks name, description and generated script. It does not compare every test option, latest result or historical log payload. A matching existing test is reused rather than overwritten with all incoming values; a nonmatching same-name test follows the test-name uniqueness helper.
When a parent test is reused, existing historical records are matched by the exchange hash of test name and the round-trip date representation. A matched log is reused without comparing its result payload in that parent mapping path. Incoming logs not mapped to an existing record are inserted with the original date, user, success, errors, payload and batch flag, linked to the resolved parent test. Local numeric log IDs are not preserved as cross-repository identity.
The log class also has its own check method: it looks up test name plus date and can compare success, errors, payload and IsBatch. That comparison excludes User. Do not infer this check governs every import: the inspected full-project path checks parent tests and then maps their logs as described above.
The repository enforces a unique key on test and date. Import is not an append-everything or last-write-wins log merge. Test conflicting same-name/same-date histories in a disposable repository before relying on preservation of both results. The owner has now selected incoming-log overwrite; the current implementation described here still requires that correction.
Batch grouping and verification
Dates and IsBatch are preserved. Batch-log views group records by date, without a separate imported run ID or source-repository identifier in that grouping. Imported and local records with the same batch timestamp can therefore appear together. Imported success flags are copied; import does not recalculate them or correct the batch reporting limitations described in test cases.
After a round-trip, verify test names, historical record counts, dates/users, errors and result tables, and batch grouping. Deleting a test deletes its historical logs through the repository foreign key's cascade. Keep an export or database backup when those records must be retained.
Object conflicts and reuse modes
The exchange model implements three reuse policies. These are internal policy names; their existence does not imply every import dialog exposes all three choices.
| Policy | Inspected behavior |
|---|---|
| use_if_match | Reuse an existing candidate only when the object's Compare method accepts it. This is the common default in the inspected classes. |
| use_always | Reuse the candidate without that content comparison, subject to object-specific guards such as connector/package type. |
| dont_use | Do not reuse the candidate through those branches; named objects commonly receive an available name and are inserted separately. |
Reuse means attaching the incoming exchange object to an existing repository entity. It is not a general overwrite of local properties with incoming properties. Comparison is object-specific and is not a deep comparison of the entire project graph.
| Object | Candidate and comparison examples |
|---|---|
| Connector | Candidate by connector name; connector type must match even for use_always. If reused, its sources and source references are checked against that connector. |
| Script | Candidate by script name; use_if_match compares name, script type and script text. |
| Package | Candidate by package name; use_if_match compares name and package type, not every package property or content row. |
| Test | Candidate by test name; comparison covers name, description and generated script, as described in the test-log section above. |
For inspected named objects, a rejected candidate passes through a name-availability helper. Do not assume one universal suffix format or that every entity supports renaming: child records and unnamed records use their own matching rules and constraints.
Reused parents can still receive children
Package import skips creating the parent when it already resolves to a repository package, but still invokes AddToDB for its child references and variables. Consequently, reusing a package does not mean ignoring its incoming contents, nor does matching name/type prove the contents are identical. Each child has its own mapping and insertion behavior.
For example, importing a same-name, same-type package can reuse the local package even when other package settings differ. Inspect the retained settings and resulting references/variables after import. A same-name script with different text takes a different path under use_if_match and requests an available name instead of replacing that script.
Conflict review procedure
- Keep the original export and a recoverable copy of the destination repository.
- Test against a destination containing representative same-name objects.
- Compare resolved names, retained parent settings, children and cross-object references.
- Check generated SQL and embedded expressions after any renaming; do not infer arbitrary text rewriting from entity mapping.
- Verify the resulting project before using it to generate or deploy artifacts.
These rules describe inspected entity paths, not a universal merge contract or proof of atomic import. A completed mapping step alone is not evidence that every child was inserted, every conflict was resolved, or all changes could be rolled back together.
Mapping sources, tables and dependent references
Object mapping resolves exchange objects to destination entities; it does not preserve repository numeric IDs. Hash-based lookups search the objects in the imported exchange graph and return their resolved entities. A missing object or unresolved mapping can therefore prevent a dependent reference from being created even when an unrelated same-name object exists elsewhere in the destination.
Source and table candidates
| Object | Candidate scope | use_if_match checks |
|---|---|---|
| Source | Selected/reused connector, source schema and source name | Source type, name, schema, query; each incoming column and constraint must match. Additional local columns or constraints are permitted. |
| Table | Selected/reused schema, table name | Table type and name; equal column and measure counts, followed by per-column and per-measure checks. |
These comparisons cover selected fields rather than every setting. When reuse is rejected, the object name is passed through a name-availability helper. With use_always, content checks are bypassed; missing child columns are not made compatible merely by reusing the parent.
Reusing a source skips its creation branch, including insertion of its incoming columns and constraints. The inspected source Set method also has a mapping limitation: it calls child Set only when the matching local child is null, leaving found child exchange objects unmapped. This differs from table Set, which maps found columns and measures. Dependent paths that require resolved source-column objects must be checked after reuse; the intended correction is pending review.
Source references
Source-reference creation locates its two endpoints by saved source schema/name inside the resolved connector. It does not use the table-reference hash lookup described below. A source rename therefore needs special verification: the inspected reference path still uses its saved endpoint names.
A reference with the same description between the same two sources, in either direction, is treated as an existing-reference conflict during creation. Missing endpoints or rejected creation append diagnostics to the import error collection. Source-reference columns resolve column names within the endpoint sources; expressions provide an alternative to column bindings. Inspect the resulting pairs and statements rather than treating an imported reference header as proof of a complete mapping.
Table references and Transformation references
Table references resolve both endpoints through their exchange hashes. Candidate references are looked up by resolved table pair in either direction plus description. Content comparison, however, checks the directed endpoints and selected properties, including cardinality and statement, and checks column-pair entries. It is not a full equality check of every reference flag.
A conflicting reference can receive a description suffix consisting of an underscore and eight generated characters. New reference-column entries look up column names within the resolved tables, accepting a non-null expression instead of a resolved column on either side. An empty or invalid expression is not proved valid by that non-null test.
A Transformation reference needs all of the following:
- An imported table reference matching both stored endpoint hashes and its stored description, with a resolved repository reference.
- Both Transformation source rows found by their sequence numbers.
- No existing reference between those source rows in either direction.
Missing dependencies or duplicates append diagnostics instead of creating that Transformation reference. Conflict limitation: changing a table reference's description during conflict resolution can break this description-based lookup unless the dependent description is updated too. Do not assume a successfully renamed reference remains selected in its imported Transformations.
Other table links and SQL text
History, persisting, hub, satellite and link table associations also resolve through table hashes. The inspected table-link setup clears a resolved self-reference and records a diagnostic for those associations.
Transformation view definitions have a separate text-replacement helper for schema-qualified names, supporting bracketed and unbracketed forms. It uses regular expressions, not a SQL syntax tree. This is separate from entity/reference mapping and is not a guarantee of safe rewriting of every SQL statement, literal or comment. Inspect renamed-object references in generated/view SQL explicitly.
Focused round-trip check
Import a small connected pair into a disposable repository, first with matching local objects and then with a deliberate name/reference conflict. Verify source and table reuse, all column bindings, source-reference endpoints, table-reference direction and descriptions, Transformation sequence-number bindings, special table links and view SQL. Read import diagnostics even when parent objects appear in the tree. Live round-trip execution has not been performed for this documentation review.
Import and Export package field mappings
Here, Import and Export mean data-flow package types; loading a project is a separate operation. Their directions remain:
| Package | Data source | Data destination |
|---|---|---|
| Import | Connector SOURCE | Warehouse TABLE |
| Export | Warehouse TABLE | Connector SOURCE, representing the external destination |
Project exchange stores the table and source endpoints as exchange hashes. Once both parent entities resolve, column mappings look up physical column names within those resolved entities. They do not match by display position, friendly name or the old repository column ID. Each mapping carries Description and SSIS_Statement unchanged; this path does not rewrite expression text after a column rename.
Operation-level settings and existing operations
The exchange constructors copy filters, pre/post SQL, buffer/commit settings, identity/null/locking/constraint options, batch size and timeout. Import additionally carries Imp_SQL, UpdateStatistics, UseLogging and UseVariable. Export carries truncate settings and BulkInsert; a null DoTruncate becomes false during insertion.
Both operation insertion paths first check for an existing operation of the same kind for the resolved warehouse table. That check does not include package or source identity. If such an operation exists, these paths skip creating the incoming operation and do not process its child mappings. They do not update the existing operation with incoming settings or emit a conflict diagnostic in that branch. Inspect existing operations before assuming a repeated project load updates their mappings or moves them into another package.
Missing parent source/table mappings append an import diagnostic instead of creating the operation.
Column-level differences
| Path | Inspected insertion rule |
|---|---|
| Import | Both source column and warehouse column must be found. Otherwise the mapping is skipped, with no diagnostic in this method. A nonempty SSIS_Statement does not bypass this guard. |
| Export | A mapping entity is queued even if one or both column lookups return null. Description and SSIS_Statement are retained. |
The repository permits nullable column endpoints for both mapping tables, but requires at least one endpoint or a non-null SSIS_Statement. Consequently, Export may preserve an expression-based mapping while an entirely unresolved mapping with no expression can fail database validation. Import's loader guard is stricter than that repository constraint. Neither branch validates expression semantics or guarantees that a loaded package can execute.
For round-trip verification, compare operation ownership, mapping counts, physical endpoint names and SSIS expressions. Include a direct-column mapping, a mapping with an expression and a deliberately missing/renamed column. A parent operation appearing in the repository does not establish that all its fields survived the exchange.
Source Constraints in project exchange
Constraints travel as children of a source. The exchange object stores Column_Name, IsError, Description, Statement and MessageStatement. IsError is the stored flag behind the Do not import behavior; exchange copies it rather than evaluating the constraint against data.
For a newly created source, constraints are inserted after its columns. Each constraint resolves Column_Name in that source and copies its expressions. A null Statement is normalized to an empty string on insertion; MessageStatement remains as supplied. No SQL/SSIS expression conversion or validation occurs in this transfer method.
For a reused source, the source creation branch is skipped, including constraint insertion. Source comparison looks up a candidate constraint by column name and then compares statement, message, description, flag and column name. It selects the first matching-column candidate, not an exhaustive search through all constraints on that column. Multiple constraints on one column therefore deserve a specific reuse test. Additional local constraints are allowed by the source-level count check.
Current nullable-column limitation: The repository allows SourceColumnID to be null, and constraint insertion can store an unresolved column as null. However, the export constructor directly dereferences the associated source column when building the exchange record. A constraint without a column can therefore fail serialization through this path. Some source reuse lookups also dereference that relationship. Column-free constraints are not a verified round-trip scenario.
Inspect constraint counts, column bindings, Do not import, both expression fields and descriptions after loading. Existing source-child mapping limitations are described above. Keep the original export when testing constraints that use expressions or omit a column.
Owner decisions on exchange policy
The following decisions clarify intended behavior. They do not imply that all requested corrections have already been implemented.
- Existing Import/Export operations are intentionally preserved for their warehouse table. Incoming settings and mappings for that operation are skipped.
- Package reuse by the existing comparison rule, retaining local parent settings while handling incoming children, is intentional.
- Incoming dependencies must follow the incoming object after renaming; existing local dependencies must remain unchanged. Current name/description mapping limitations above still require implementation review.
- Expression-based field mappings must survive with one column omitted. An unresolved named column should produce a skipped mapping with a logged error, rather than a silent omission.
- Source Constraints may have no column; multiple constraints may use one column. Their identity is determined by description and expressions. Current null handling and first-column matching do not fully establish this contract.
- For a conflicting log of the same resolved test and timestamp, the incoming log should overwrite the local one. The currently inspected parent-reuse path retains the mapped local log; overwrite is a requested correction, not yet documented as implemented.
Historization and Persisting operations in project exchange
Historization settings
The history operation resolves its destination table through the imported table hash and attaches to the resolved package. A missing table records a diagnostic. When an existing history operation already targets that table, the insertion path skips the incoming operation and its children; it does not merge or replace those settings.
For a new operation, the transfer copies history mode and procedure text, insert-only/missing-record policy, future-history and source-duplicate options, filters, truncate/statistics/logging flags, pre/post SQL, source-history reuse and date expressions. It also copies technical-date and root/previous/next key field names, source persistence, empty-source handling and buffer/insert settings. A null UseHashJoin is normalized to numeric value 1 during insertion. Copied procedure text is metadata, not proof that the procedure has been deployed to the destination warehouse.
Per-column history policies resolve the physical column name in the destination history table. Found columns receive SCD_Type, EmptyValue and EmptyValueUseOld. Missing columns are skipped in this method without an appended diagnostic. After import, compare every intended SCD policy and empty-record value rather than only the parent history settings.
Calculated history fields
Calculated fields are separate children of the history operation. Their name, type identifier, length, precision, scale, expression and empty-record settings are copied. A null expression becomes an empty string. These fields do not require a same-name existing physical column during this insertion step.
The calculated-field class contains a comparison/check method, but the inspected parent insertion path calls AddToDB directly for a new history operation and skips the whole child branch for an existing operation. The mere presence of that comparison method does not establish a general merge of calculated fields on repeat import. Inspect the expression text after renamed objects; this transfer method does not parse or rewrite it.
Persisting settings
Persisting resolves its source Transformation by exchange hash and its optional increment column by column hash. If the Transformation is missing, it records a diagnostic. If a persisting operation already exists for that Transformation, this insertion path skips the incoming operation.
For a new operation, pre/post SQL, mode, switch method, statistics/logging, increment column, duplicate removal and transaction settings are assigned. Missing nullable values receive these loader defaults:
| Stored field | Loader default |
|---|---|
| Mode | 1 |
| UsePartSwitch | 1 |
| UpdateStatistics | true |
| UseLogging | true |
| RemoveDuplicates | false |
| UseTransaction | 1 |
These numeric values are loader defaults, not a claim that every absent option should be interpreted by its display label in older exports. An unresolved increment-column hash yields no column binding in this method; it does not automatically pick another column. Verify incremental mode configuration before generating the procedure.
Verification checklist
Use a new repository and then a destination containing the same operations. Compare history date expressions, chain fields, each SCD/empty-record policy, calculated expressions/types and persisting increment binding. Generate and review destination procedures separately. Exported configuration does not include execution of the historization or persisting operation, and this documentation review has not performed a live round-trip.
See the main window commands and cloud file picker for selecting files and managing cloud history.