|
28 | 28 | "* [Create a Spanner instance](https://cloud.google.com/spanner/docs/create-manage-instances)\n", |
29 | 29 | "* [Create a Spanner database](https://cloud.google.com/spanner/docs/create-manage-databases)\n", |
30 | 30 | "* [Create a Spanner table](https://cloud.google.com/spanner/docs/create-query-database-console#create-schema)\n", |
31 | | - "\n", |
32 | | - "After confirmed access to database in the runtime environment of this notebook, filling the following values and run the cell before running example scripts." |
33 | | - ] |
34 | | - }, |
35 | | - { |
36 | | - "cell_type": "code", |
37 | | - "execution_count": null, |
38 | | - "metadata": {}, |
39 | | - "outputs": [], |
40 | | - "source": [ |
41 | | - "# @markdown Please specify an instance id, a database, and a table for demo purpose.\n", |
42 | | - "INSTANCE_ID = \"test_instance\" # @param {type:\"string\"}\n", |
43 | | - "DATABASE_ID = \"test_database\" # @param {type:\"string\"}\n", |
44 | | - "TABLE_NAME = \"test_table\" # @param {type:\"string\"}" |
| 31 | + "\n" |
45 | 32 | ] |
46 | | - }, |
| 33 | + }, |
47 | 34 | { |
48 | 35 | "cell_type": "markdown", |
49 | 36 | "metadata": {}, |
|
61 | 48 | }, |
62 | 49 | "outputs": [], |
63 | 50 | "source": [ |
64 | | - "%pip install -upgrade --quiet langchain-google-spanner langchain" |
| 51 | + "%pip install --upgrade --quiet langchain-google-spanner langchain" |
65 | 52 | ] |
66 | 53 | }, |
67 | 54 | { |
|
84 | 71 | "# app.kernel.do_shutdown(True)" |
85 | 72 | ] |
86 | 73 | }, |
| 74 | + { |
| 75 | + "cell_type": "markdown", |
| 76 | + "metadata": {}, |
| 77 | + "source": [ |
| 78 | + "After confirmed access to database in the runtime environment of this notebook, filling the following values and run the cell before running example scripts." |
| 79 | + ] |
| 80 | + }, |
| 81 | + { |
| 82 | + "cell_type": "code", |
| 83 | + "execution_count": null, |
| 84 | + "metadata": {}, |
| 85 | + "outputs": [], |
| 86 | + "source": [ |
| 87 | + "# @markdown Please specify an instance id, a database, and a table for demo purpose.\n", |
| 88 | + "INSTANCE_ID = \"test_instance\" # @param {type:\"string\"}\n", |
| 89 | + "DATABASE_ID = \"test_database\" # @param {type:\"string\"}\n", |
| 90 | + "TABLE_NAME = \"test_table\" # @param {type:\"string\"}" |
| 91 | + ] |
| 92 | + }, |
87 | 93 | { |
88 | 94 | "cell_type": "markdown", |
89 | 95 | "metadata": {}, |
|
109 | 115 | "PROJECT_ID = \"my-project-id\" # @param {type:\"string\"}\n", |
110 | 116 | "\n", |
111 | 117 | "# Set the project id\n", |
112 | | - "!gcloud config set project {PROJECT_ID}" |
| 118 | + "!gcloud config set project {PROJECT_ID}\n", |
| 119 | + "%env GOOGLE_CLOUD_PROJECT={PROJECT_ID}" |
113 | 120 | ] |
114 | 121 | }, |
115 | 122 | { |
|
0 commit comments