Update a project when the source changed
When your source changes, you add a new discovery of the same source objects to the source system and update the source model objects from it. Use it after a change such as a new column, a changed data type or a removed table. Afterwards the source model objects match the new discovery, and you adjust the model objects that read them.
The source system keeps every discovery you add, so you can compare two discoveries and switch back to an earlier one.
Prerequisites
- The project has a source system with the discovery from which you created the source model objects, see Add a Source System.
- A feature branch for the update, see Create a Branch. The main branch keeps the current model until you merge the feature branch.
- A new discovery file with every source object that the project uses, not only the changed ones, created with the biGENIUS-X Discovery App, see Use the Discovery application (UI version) or Use the Discovery application (CLI version).
Update the source model objects
- Open Data Connections and choose Source Systems, see Understand Data Connections overview. The page lists the source systems of the project with their discoveries.
- On the source system, click Add Discovery. The side panel Import a discovered file opens with the steps Add Discovery, Compare and Add Source.
- In Add Discovery, select the Discovery Filetype (
biGENIUS Discoveryfor a file of the Discovery App) and the new discovery file, then click Next. - In Compare, review the source model objects marked
M(modified) andD(deleted). Select a model object to see its old and new definition side by side, then click Next. The client skips this step when no existing source model object changed.
Update deletes every source model object marked
D. Other model objects lose it as a dataflow source, and their term mappings that read it lose their expression. A discovery without some of the source objects in use marks themD, and you cannot deselect them here. WhenDlists a source object that the source still holds, the discovery left it out: click Cancel, and the client removes the new discovery, so that you can add a complete one. When the source table was removed, continue, and adjust the model objects that read it in step 7. - In Add Source, select the new source objects that you want as source model objects. The existing source model objects are already selected.
- Click Update. The client updates the modified source model objects, deletes those marked
Dand creates the new ones you selected. The new discovery appears in the list of the source system. - Adjust the model objects that read the changed source model objects.
A delta deployment drops the column of a deleted term and the table of a deleted model object, and their data and history are lost. To keep the history of a historized object such as a Satellite, keep the term and give it an expression, for example
CAST(NULL AS <data type>), instead of deleting it. Before you delete a model object whose table holds history, back up the table, or keep itsDROP TABLEout of the reviewed delta deployment.- Changed data type: Update changes only the source model object. Set the new data type in Manage Terms of the Stage that reads it and of the later model objects that carry the term. Show Data Lineage in the menu of the Stage shows these model objects, see Show Data Lineage.
- New column: in Manage Term Mappings of the Stage, select Auto as the mapping mode, then hover over the Mapped column of the new source term and click the plus icon. The client creates a Stage term of the same name and maps it, see Map or unmap a Source Term with a Target Term. To carry the column into later model objects, add and map it there as well.
- Renamed column: Update matches terms by name, so the renamed column becomes a new term and the old term is deleted. The term mappings that read the old term lose their expression. Map the new source term to the Stage term that lost its expression in the Target mapping mode, see Map or unmap a Source Term with a Target Term. Auto would create a second Stage term, which a delta deployment adds as a new column.
- Removed column: Update deletes the term, and the term mappings that read it lose their expression. Delete the term in the Stage and in the later model objects that carry it, or give it an expression, see Delete a Term.
- Removed table: Update deletes its source model object, so the Stage that read it has no source left. The client shows the error ID-10003 on the Stage, which blocks generation, see Dataflow Set Model Objects amount (Business Rule). Delete the Stage with Delete Object, see Delete a Model Object. In the later model objects that read it, delete the dataflow that read the Stage, or the model object when no other dataflow loads it. To keep the Stage instead, add the source model object that replaces the table to its dataflow set and map its terms, see Add a Model Object to a Dataflow Set.
- Generate and deploy the feature branch to your development target, merge it, then deploy to production. For tables that already hold data, use a Delta deployment; Related articles lists the article of each platform. Fabric Lakehouse and Fabric Warehouse have no delta deployment: Redeploy and keep data in Fabric Lakehouse - Deployment and Fabric Warehouse - Deployment keeps the data, but column changes are not applied to existing tables. Change these tables by hand before the redeploy, as far as ALTER TABLE of the platform allows, or redeploy with Generate Drop Table Statements selected, which drops the tables and their data. On Snowflake dbt and Databricks dbt, a dbt run adds new columns to existing tables, and a changed data type needs a full refresh, which loses the history that the sources no longer hold, see dbt - Full refresh.
To compare two discoveries that the source system already holds, choose Switch Discovery in the context menu of the discovery that is not in use. The side panel shows the same Compare and Add Source steps, and the switch deletes the source model objects marked D in the same way, see Switch to another Discovery.
A source system from a Data Marketplace Data Contract is updated without a discovery file. When a newer version of its Data Contract exists, the source system shows Update, which opens the same Compare and Add Source steps, see Manage Source Systems.
Example
The source table SalesOrderDetail widens the column CarrierTrackingNumber from 25 to 30 characters. After a new discovery, the Compare step marks SalesOrderDetail with M and shows the length 25 in the current source model and 30 in the new discovery. After Update, the term CarrierTrackingNumber of the source model object has the length 30. The term CarrierTrackingNumber of the Stage that reads it still has the length 25, until you change it to 30 in Manage Terms of the Stage.
Check the result
The source system lists the new discovery, and the source model objects show the terms and data types of the new discovery in Manage Terms. The Stages that read them show the data types you set.
Failure symptoms and recovery
The client rejects the discovery file
Message: This Discovery file is not compatible.
Cause: The client cannot map the data types of the file to the source system, for example because the file has another format than the selected Discovery Filetype.
Fix: Select the Discovery Filetype that matches the file, or create the discovery again with the Discovery App.
The source system type does not match
Message: Discovery file source system type is not compatible with the selected source system type.
Cause: The discovery file comes from another type of source than the source system, for example an Oracle discovery for a Microsoft SQL Server source system.
Fix: Add the discovery to a source system of the matching type, or discover the source of this source system.
Related articles
- Previous: Create a Branch, Add a Source System, Use the Discovery application (UI version), Use the Discovery application (CLI version)
- Next: Delta deployment
- Microsoft SQL Server: Delta Deployment with Liquibase
- Snowflake: Delta Deployment with Liquibase
- Snowflake dbt: dbt - Deployment, dbt - Full refresh
- Databricks: Delta Deployment with Liquibase
- Databricks dbt: dbt - Deployment, dbt - Full refresh
- Fabric Lakehouse: Deployment
- Fabric Warehouse: Deployment
- Oracle: Delta Deployment with Liquibase
- See also: Understand Data Connections overview, Add a Discovery, Switch to another Discovery, Update Source Model Objects from a new Discovery, Manage Source Systems, Show Data Lineage, Map or unmap a Source Term with a Target Term, Delete a Term, Delete a Model Object, Delete a Dataflow, Add a Model Object to a Dataflow Set, Dataflow Set Model Objects amount (Business Rule)