Comparing Changes using Complete Compare
You can compare your model with database, script, or another local model to check for differences using the Complete Compare wizard. Based on the results, you can then resolve or merge differences. Thus, maintaining a consistent model and database.
This topic walks you through the steps to compare a Google BigQuery model with database.
To compare models with database:
-
Open your Google BigQuery model.
Ensure that you are in the Physical mode.
For example, the following image uses a Google BigQuery model with 4 tables.
-
Click Actions > Complete Compare.
By default, the Complete Compare wizard assigns the open model as the Left Model. Hence, the Right Model tab appears. -
Click Database/Script.
By default, the Allow Demand Loading option is selected. -
Click Load.
The New Model dialog box appears. This starts the reverse engineering process to pull a model from the database to compare. -
Ensure that the Database is set to Google BigQuery. Then, click Next.
The Reverse Engineering Wizard appears. -
Click Datasets. Then, click Next.
The Connection tab appears. Use this section to connect to the database from which you want to reverse engineer the model. -
After connection is established, click Next.
The Datasets tab appears. It displays a list of available datasets. -
Under Available Datasets, select the datasets that you want to reverse engineer. Then, click
.
This moves the selected datasets under Selected Datasets . -
Click Next and on the Tables tab , click
.
This selects all the available tables. -
Click Next and on the Option Set tab, keep the default configuration.
-
Click Next and on the Detail Options tab, keep the default configuration.
-
Click OK.
The reverse engineering process starts. Once the process is complete, the Right Model is set to the one that you reverse engineered. -
Click Next and on the Type Selection tab, select the appropriate options.
For example, the following image shows the default options.
-
Click Next and in the Left Object Selection tab, select the appropriate options.
For example, the following image shows the default options.
-
Click Next and on the Right Object Selection tab, select the appropriate options.
For example, the following image shows the default options.
-
Click Compare.
The comparison process runs, and the Resolve Differences dialog box appears. It displays the differences between your model and database.
For example, the following image shows that the mydataset8.multiplyInputs3 function is available in your model but not in the database.
Select the Function and click. This will move the mydataset8.multiplyInputs3 table to the right model (from the database). Similarly, resolve other differences.
-
As differences were moved to the right model, click
.
This opens the Forward Engineering Alter Script Generation Wizard. -
Click Option Selection and clear all the Drop check boxes.
-
Click Table Filter and select or verify the tables to be included in the forward engineering script.
-
Click Preview to view and verify the alter script.
-
Click Generate and connect to your Google BigQuery database.
The forward engineering process starts. The script generates your physical database schema. You can access your database and verify the newly generated schema. -
Click OK. Then click Finish.
This closes the Resolve Differences dialog box and displays the Complete Compare wizard. -
Click Close.
Copyright © 2023 Quest Software, Inc. |