Project versioning
Compose provides built-in project version control using the Git engine. Version control enables Compose developers to commit project revisions to both a local and a remote Git repository. If a mistake is made, Compose developers can easily roll back to earlier versions of the project while minimizing disruption to all team members.
Revisions only store metadata and mapping information. After you revert to a saved revision, you will need to recreate the data warehouse and data mart tables.
Configuring version control settings
To define Version Control Settings:
-
From the project drop-down menu, select Version Control > Settings.
The Version Control Settings - Git window opens.
The Local Commits area shows the local root folder where project revisions are committed. The first time a project revision is committed, Compose creates a JSON file with the current project settings. The <project_name>.json file is archived to a ZIP file (<project_name>_deployment.zip), which is located in a project-specific folder under the source-control folder.
-
To enable commits to a remote Git database, select Enable remote commits and then provide the following information:
- URL - The address of the remote Git database.
- User name - Your user name for accessing the remote Git database.
- Password - Your Personal Access Token for accessing the remote Git database.
Committing projects
You can commit a project using the console or using the CLI:
To commit a project to Version Control using the web console:
-
From the project drop-down menu, select Version Control > Commit.
The Commit - <Project_Name> window opens.
- Enter a message in the Message box and optionally select the Remote push check box. Note that the Remote push check box will be disabled if the Enable remote commits option described above is not selected.
To commit a project to Version Control using the CLI:
Run the following command from the Compose bin directory:
Command syntax
ComposeCli.exe commit --project project_name [--message message] [--remote]
Parameters
Parameter | Description |
---|---|
--project | The name of the project. |
--message |
An optional message to accompany the commit. |
--remote |
This parameter is required if you want to commit the project to a remote Git repository (see above). By default, the project will be committed locally to <product_dir>\data\source-control. |
Example
ComposeCli.exe commit --project MyProject --remote
To revert to a saved revision:
-
From the project drop-down menu, select Version Control > Revisions history.
The Revision History - <Project_Name> window opens.
By default, the last 10 revisions are shown. You can change this number by selecting one of the available options from the Show drop-down list.
- Optionally, use the Search box to find a specific revision.
- Select the desired revision and then click the Deploy to Revision toolbar button.
-
When prompted to confirm the operation, click Yes.
The existing project will be replaced.
- Click Close to close the Revision History - <Project_Name> window.
To download a saved revision:
-
From the project drop-down menu, select Version Control > Revisions history.
The Revision History - <Project_Name> window opens.
By default, the last 10 revisions are shown. You can change this number by selecting one of the available options from the Show drop-down list.
- Optionally, use the Search box to find a specific revision.
-
Select the desired revision and then click the Download Revision as Package toolbar button.
The package will be saved as a ZIP file in your browser's default download location.