This is an automated email from the ASF dual-hosted git repository.

jrmccluskey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new bfffff7f254 Auth with project id in our notebook (#31966)
bfffff7f254 is described below

commit bfffff7f2540f35bce23b251672575224e0762c1
Author: Danny McCormick <dannymccorm...@google.com>
AuthorDate: Wed Jul 24 17:15:58 2024 +0200

    Auth with project id in our notebook (#31966)
    
    * Auth with project id
    
    * Wording/formatting
---
 .../beam-ml/bigtable_enrichment_transform.ipynb    | 28 ++++++++--------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/examples/notebooks/beam-ml/bigtable_enrichment_transform.ipynb 
b/examples/notebooks/beam-ml/bigtable_enrichment_transform.ipynb
index 7510831bac4..95be8b1d957 100644
--- a/examples/notebooks/beam-ml/bigtable_enrichment_transform.ipynb
+++ b/examples/notebooks/beam-ml/bigtable_enrichment_transform.ipynb
@@ -139,41 +139,33 @@
       },
       "source": [
         "### Authenticate with Google Cloud\n",
-        "This notebook reads data from Pub/Sub and Bigtable. To use your 
Google Cloud account, authenticate this notebook."
+        "This notebook reads data from Pub/Sub and Bigtable. To use your 
Google Cloud account, authenticate this notebook.\n",
+        "To prepare for this step, replace `<PROJECT_ID>`, `<INSTANCE_ID>`, 
and `<TABLE_ID>` with the appropriate values for your setup. These fields are 
used with Bigtable."
       ]
     },
     {
       "cell_type": "code",
       "execution_count": null,
       "metadata": {
-        "id": "Kz9sccyGBqz3"
+        "id": "wEXucyi2liij"
       },
       "outputs": [],
       "source": [
-        "from google.colab import auth\n",
-        "auth.authenticate_user()"
-      ]
-    },
-    {
-      "cell_type": "markdown",
-      "metadata": {
-        "id": "nAmGgUMt48o9"
-      },
-      "source": [
-        "Replace `<PROJECT_ID>`, `<INSTANCE_ID>`, and `<TABLE_ID>` with the 
appropriate values for your setup. These fields are used with Bigtable."
+        "PROJECT_ID = \"<PROJECT_ID>\"\n",
+        "INSTANCE_ID = \"<INSTANCE_ID>\"\n",
+        "TABLE_ID = \"<TABLE_ID>\""
       ]
     },
     {
       "cell_type": "code",
       "execution_count": null,
       "metadata": {
-        "id": "wEXucyi2liij"
+        "id": "Kz9sccyGBqz3"
       },
       "outputs": [],
       "source": [
-        "PROJECT_ID = \"<PROJECT_ID>\"\n",
-        "INSTANCE_ID = \"<INSTANCE_ID>\"\n",
-        "TABLE_ID = \"<TABLE_ID>\""
+        "from google.colab import auth\n",
+        "auth.authenticate_user(project_id=PROJECT_ID)"
       ]
     },
     {
@@ -879,4 +871,4 @@
   },
   "nbformat": 4,
   "nbformat_minor": 0
-}
\ No newline at end of file
+}

Reply via email to