
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Create a BigQuery dataset
/ 10
Set up a Striim server instance
/ 10
Set up connector between Striim and SQL Server instance
/ 20
Configure credentials for Striim to write data to BigQuery
/ 20
Review the migrated data in BigQuery
/ 20
This lab demonstrates how to migrate SQL Server data to BigQuery using Google Cloud's data migration partner, Striim.
Striim is a comprehensive streaming ETL platform that enables online data migrations and continuous streaming replication from on-premises and cloud data sources to Google Cloud (including BigQuery, Cloud Spanner, and Cloud SQL) through a graphical drag-and-drop interface.
To learn more about database migration and replication, review Google Cloud documentation on database migration.
In this lab, you will learn to:
This Qwiklabs hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is a panel populated with the temporary credentials that you must use for this lab.
Copy the username, and then click Open Google Console. The lab spins up resources, and then opens another tab that shows the Choose an account page.
On the Choose an account page, click Use Another Account. The Sign in page opens.
Paste the username that you copied from the Connection Details panel. Then copy and paste the password.
After a few moments, the Cloud console opens in this tab.
Google Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud.
Google Cloud Shell provides command-line access to your Google Cloud resources.
In Cloud console, on the top right toolbar, click the Open Cloud Shell button.
Click Continue.
It takes a few moments to provision and connect to the environment. When you are connected, you are already authenticated, and the project is set to your PROJECT_ID. For example:
gcloud is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
Output:
Example output:
Output:
Example output:
To review the source data in the SQL Server instance, you can install the SQL Server client.
For Do you want to continue?, enter Y. For Do you accept the license terms?, enter yes.
Leave the browser tab with Cloud Shell open, and proceed to the next task in a new browser tab.
In this task, you create a BigQuery dataset and table with the same schema as the source data in SQL Server. This new dataset and table will be the target destination for the migrated data from SQL Server.
The SQL Server instance contains one table named Orders, which you migrate in a later task. First, connect to the SQL Server instance and review the data in the table.
In the Google Cloud Console, in the Navigation menu (), click Compute Engine > VM instances.
Locate the line for sqlsrvcdc, and copy the External IP address (for example, '34.72.125.251').
Return the original browser tab with Cloud Shell.
The output will resemble the following value.
The table contains ten rows and resembles the following table structure.
ORDER_ID | ORDER_DATE | ORDER_MODE | CUSTOMER_ID | More columns... |
---|---|---|---|---|
1001 | 1568927976017 | In-Store | 1001 | ... |
1002 | 1568928036017 | In-Store | 1002 | ... |
1003 | 1568928096017 | CompanyB | 1003 | ... |
1004 | 1568928156017 | CompanyA | 1004 | ... |
1005 | 1568928216017 | CompanyA | 1005 | ... |
1006 | 1568928276017 | In-Store | 1006 | ... |
1007 | 1568928336017 | CompanyA | 1007 | ... |
1008 | 1568928396017 | Online | 1008 | ... |
1009 | 1568928456017 | CompanyA | 1009 | ... |
1010 | 1568928516017 | CompanyB | 1010 | ... |
After reviewing the source data in SQL Server, you can create a new dataset and table in BigQuery with the same schema as the SQL Server data.
For the purposes of this lab, the dataset is set to expire in 7200 seconds (two hours).
For the purposes of this lab, the table is also set to expire in 7200 seconds (two hours).
Leave the browser tab with Cloud Shell open, and proceed to the next task in a new browser tab.
Click Check my progress to verify the objective.
In this task, you set up an instance of the Striim server through the Google Cloud Marketplace.
In the Google Cloud Console, in the Navigation menu (), click Marketplace.
In the search box type Striim and hit Return or Enter. Select STRIIM ( metered ) from the list of options.
Click Get Started.
Check the Box By purchasing, deploying.... under Terms and agreements.
Click Agree.
Click Deploy, on the pop-up window entitled Successfully agreed to terms.
On the New STRIIM ( metered ) deployment screen that appears, change the Zone to
Change the Machine Type to:
Series: E2
Machine type: e2-standard-4 (4 vCPU, 16 GB memory).
Leave the other options at their default values.
Scroll down the page and Check the box for I accept the GCP Marketplace Terms of Service....
Click Deploy.
Leave the Deployment Manager page open, and proceed to the next task in the original browser tab with Cloud Shell.
Click Check my progress to verify the objective.
To unpause Cloud Shell, press Ctrl+C.
To create a variable containing the Striim server instance name, run the following command and replace INSTANCENAME with the instance name provided on the Deployment Manager page (for example, striim-metered-1-vm):
The output will resemble the following values.
Leave the browser tab with Cloud Shell open, and proceed to the next task using the Deployment Manager page.
On the Deployment Manager page, within the Striim server instance details, click the link for Site address.
The Striim configuration wizard will open in a new browser tab. Leave the Deployment Manager page open.
If there is a redirect notice, click the link provided. If a window opens to confirm the use of cookies, click I Agree.
Click Accept Striim EULA and Continue.
To configure your Striim server instance, enter the following values into the form:
Property | Value |
---|---|
Cluster name | my_cluster |
Admin password | striim-password |
Re-enter Admin password | striim-password |
Sys user password | striim-password |
Re-enter Sys user password | striim-password |
Striim Key Store password | striim-password |
Re-enter Striim Key Store password | striim-password |
Click Save and Continue.
Click Launch.
Processing will occur in the background and may take a few minutes to complete. After configuration is complete, the Log in button will appear.
Click Log in.
Enter the following login details:
Property | Value |
---|---|
Username | admin |
Password | striim-password |
Click Log in.
After a successful login, the Striim administration console will appear.
Leave the Striim administration console page open, and proceed to the next task using the Deployment Manager page.
In this task, you use the SQL Server JDBC driver to allow Striim to connect to your SQL Server instance.
On the Deployment Manager page, within the Striim server instance details, click SSH (located next to Visit the site).
A new SSH terminal window for the virtual machine will open.
Close the Striim SSH terminal window.
Return to the browser tab for the Striim administration console, and refresh the page.
If the administration console page does not resolve after 5 minutes, use the site address http://STRIIM_IP_ADDRESS:9080/, replacing STRIIM_IP_ADDRESS with the IP address provided on the Deployment Manager page (for example, http://104.154.159.38:9080).
Log in to the administration console again using the following login details:
Property | Value |
---|---|
Username | admin |
Password | striim-password |
Click Log in.
Leave the Striim administration console page open, and proceed to the next task in the original browser tab with Cloud Shell.
Click Check my progress to verify the objective.
In this task, you create service account credentials that Striim can use to write to the BigQuery table.
To unpause Cloud Shell, press Ctrl+C.
To create a variable for the Google Cloud project name, run the following command:
The output will resemble the following values.
Note the Google Cloud project name for use in a later task (for example, qwiklabs-gcp-00-444c1562d2ad).
If you are asked to set a passphrase for a new SSH key, press ENTER to leave the passphrase empty.
The output will resemble the following.
You can now create a Striim application for the data migration!
Leave the browser tab with Cloud Shell open, and proceed to the next task using the Striim application console page.
Click Check my progress to verify the objective.
An online database migration moves data from a source database (either on-premises or hosted on a cloud provider) to a target database in Google Cloud. The source database remains fully accessible to business applications with minimal performance impact on the source database with this type of configuration.
An online migration can be done as a one-time batch load or as a continuous load and capture of changes. In this task, you create and run a one-time batch migration of data from SQL Server to BigQuery.
On the Striim administration console, click Apps > Create New.
Click Start from scratch.
For Name, enter Batch
For Namespace, select admin.
The default namespace in this lab is admin. Namespaces are logical groupings that help you organize applications.
The Flow Designer page will load. The standard connectors to create data applications are in the left side menu bar.
To do a one-time batch load of data, drag the Database tile from Sources to the center of the page.
Enter the following SQL Server connection properties in the New Source pane.
Property | Value |
---|---|
Name | batch_source |
Connection URL | jdbc:sqlserver://EXTERNAL_IP_ADDRESS:1433;DatabaseName=striimlab |
Username | striim |
Password | striim-password |
Click Show Advanced Settings.
For Tables, enter striimlab.dbo.ORDERS
Click Hide Advanced Settings.
For Output To, select New Output, and enter batch_inprocess
Click Save.
When you see the message Component saved, the DatabaseReader component called batch_source has been saved successfully.
To test the configuration settings, click Created, and select Deploy App.
Select default, and click Deploy.
Click the wave icon for batch_inprocess, and then click the eye icon for Preview on run.
You will now see the Striim application running and data flowing through the pipeline.
If there are any errors, review the details you provided in the previous section for the DatabaseReader component called batch_source.
You have successfully connected to your source SQL Server database and tested that Striim can read the data.
To stop the application, click Running, and select Stop App.
Click Stopped, and then select Undeploy App.
After the successful test connection to the source SQL Server database, you can now connect the workflow to the target destination table in BigQuery.
Click the wave icon for batch_inprocess.
Click the plus sign (+) icon, and select Connect next Target component.
For Name, enter BigQueryInitialLoadTarget
For Adapter, search for BigQuery, and select BigQueryWriter.
For Tables, enter striimlab.dbo.ORDERS,striimlab.orders
The Tables property is a list of source-target pairs separated by semicolons. Each pair denotes the full names of the source and target tables separated by commas. If you must specify more than one table, the list typically resembles the following:
The Google Cloud project name was provided in step 5 of Task 4 and is also available on the left side panel of the current lab instruction page. You can also return to the Dashboard homepage of your Google Cloud project to see the project name.
Click Show Advanced Settings.
For Service Account Key, enter /opt/striim/striim-bq-key.json
The Service Account Key property is a fully qualified path and name of the key file you created and uploaded in a previous task.
To deploy the application, click Created, and select Deploy App.
Select default, and click Deploy.
To start the application, click Deployed, and select Start App.
In the Google Cloud Console, in the Navigation menu (), click BigQuery.
To see the dataset that you created in a previous task, click the project name in Explorer pane (for example, qwiklabs-gcp-00-5222d70993ea) to expand the dataset list.
To see the table that you created in a previous task, click striimlab to expand the table list.
For the orders table, select Query.
Enter the following SQL query into the Query editor window, and click Run.
The output should resemble the following:
Click Check my progress to verify the objective.
To stop the application, on the Flow Designer page, click Running, and then select Stop App.
Click Stopped, and then select Undeploy App.
You have successfully set up a migration pipeline from SQL Server to BigQuery using Striim to complete the online database migration.
When you have completed your lab, click End Lab. Google Cloud Skills Boost removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2022 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one