准备工作
- 实验会创建一个 Google Cloud 项目和一些资源,供您使用限定的一段时间
- 实验有时间限制,并且没有暂停功能。如果您中途结束实验,则必须重新开始。
- 在屏幕左上角,点击开始实验即可开始
In this lab, you learn how to run parameterized queries, create and use indexes, and execute transactions against a Spanner database.
In this lab, you learn how to:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.
This 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:
Open Vertex AI Workbench from the console, and access the pre-created instance from the workbench.
STEPS:
Artificial Intellgence , Select Vertex AI, or else you can go to Vertex AI Dashboard
Advanced options for the Machine type.Open a new Terminal window from the Launcher or from File>New>Terminal, and run
In the file explorer on the left, navigate to the home directory and open training-data-analyst/courses/understanding-spanner/colab-notebooks/Spanner_Queries_Transactions.ipynb
Run the first cell to install the Python Spanner client library.
In the second cell, update the following variables as listed:
| Variable | New Value (In the notebook, please leave the outside single quotes) |
|---|---|
| project_id | |
| region_id |
Now run the second cell. In this cell, some variables are created and the Spanner API is enabled.
Read the text prior to each code cell and run each one. Take the time to understand what the code is doing.
Congratulations! You have learned how to run parameterized queries and execute transactions against a Spanner database.
When you have completed your lab, click End Lab. Your account and the resources you've used are removed from the lab platform.
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 2023 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.
此内容目前不可用
一旦可用,我们会通过电子邮件告知您
太好了!
一旦可用,我们会通过电子邮件告知您
一次一个实验
确认结束所有现有实验并开始此实验