You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SPANNER.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,11 @@ software delivery cycle.
4
4
5
5
--
6
6
7
+
# Setup
8
+
9
+
## Required Gemini CLI Version
10
+
11
+
To install this extension, the Gemini CLI version must be v0.6.0 or above. The version can be found by running: `gemini --version`.
7
12
8
13
## Spanner MCP Server (Data Plane: Connecting and Querying)
9
14
@@ -14,11 +19,37 @@ This section covers connecting to a Spanner instance.
14
19
*`SPANNER_PROJECT`: The GCP project ID.
15
20
*`SPANNER_INSTANCE`: The Spanner instance ID.
16
21
*`SPANNER_DATABASE`: The Spanner database ID.
17
-
*`SPANNER_DIALECT`: The Spanner database dialect e.g. "googlesql" or "postgresql"
22
+
*`SPANNER_DIALECT`: The Spanner database dialect e.g. "googlesql" or "postgresql"
18
23
19
24
2.**Handle Missing Variables**: If a command fails with an error message containing a placeholder like `${SPANNER_PROJECT}`, it signifies a missing environment variable. Inform the user which variable is missing and instruct them to set it.
20
25
21
26
3.**Handle Permission Errors**: If you encounter permission errors, ensure the user has the correct Spanner permissions (e.g., `spanner.databases.get`, `spanner.databases.select`). The user likely lacks the role **Cloud Spanner Database User**
22
27
(`roles/spanner.databaseUser`) or **Cloud Spanner Database Reader** (`roles/spanner.databaseReader`). You can provide these links for assistance:
You will need to perform the following steps to change the current database connection:
38
+
39
+
1.**(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
40
+
2.**Stop the CLI:** Terminate the Gemini CLI.
41
+
3.**Update Environment Variables:** Set or update your environment variables (e.g. `SPANNER_INSTANCE`, `SPANNER_DATABASE`) to point to the new resource.
42
+
4.**Restart:** Relaunch the Gemini CLI
43
+
5.**(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
44
+
45
+
## Reusing Project Values
46
+
47
+
Users may have set project environment variables:
48
+
49
+
*`SPANNER_PROJECT`: The GCP project ID.
50
+
*`SPANNER_INSTANCE`: The Spanner instance ID.
51
+
*`SPANNER_DATABASE`: The Spanner database ID.
52
+
*`SPANNER_DIALECT`: The Spanner database dialect e.g. "googlesql" or "postgresql"
53
+
54
+
Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value.
55
+
Make sure to not use the environment variable name like `SPANNER_PROJECT`, `${SPANNER_PROJECT}`, or `$SPANNER_PROJECT`. The value can be found by using command: `echo $SPANNER_PROJECT`.
0 commit comments