riteshghorse commented on code in PR #30783:
URL: https://github.com/apache/beam/pull/30783#discussion_r1543366519


##########
examples/notebooks/beam-ml/bigtable_enrichment_transform.ipynb:
##########
@@ -509,15 +509,48 @@
         "id": "K41xhvmA5yQk"
       },
       "source": [
-        "To establish a client for the Bigtable enrichment handler, replace 
`<PROJECT_ID>`, `<INSTANCE_ID>`, and `<TABLE_ID>` with the appropriate values 
for those fields. The `row_key` variable is the field name from the input row 
that contains the row key to use when querying Bigtable.\n",
+        "Configure the `BigTableEnrichmentHandler` handler with the following 
required parameters:\n",
+        "\n",
+        "* `project_id`: the Google Cloud project ID for the Bigtable 
instance\n",
+        "* `instance_id`: the instance name of the Bigtable cluster\n",
+        "* `table_id`: the table ID of table containing relevant data\n",
+        "* `row_key`: The field name from the input row that contains the row 
key to use when querying Bigtable.\n",
         "\n",
-        "To convert a `string` type to a `byte` type or a `byte` type to a 
`string` type from Bigtable, you can configure additional options, such as 
[`app_profile_id`](https://cloud.google.com/bigtable/docs/app-profiles), 
[`row_filter`](https://cloud.google.com/python/docs/reference/bigtable/latest/row-filters),
 and 
[`encoding`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#apache_beam.transforms.enrichment_handlers.bigtable.BigTableEnrichmentHandler:~:text=for%20more%20details.-,encoding,-(str)%20%E2%80%93%20encoding)
 type.\n",
+        "Optionally, to provide additional configuration to the 
`BigTableEnrichmentHandler` handler, see [module 
docs](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#module-apache_beam.transforms.enrichment_handlers.bigtable)."
+      ]
+    },
+    {
+      "cell_type": "markdown",
+      "metadata": {
+        "id": "yFMcaf8i7TbI"
+      },
+      "source": [
+        "**Note:** When exceptions occur, by default, the logging severity is 
set to warning 
([`ExceptionLevel.WARN`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.utils.html#apache_beam.transforms.enrichment_handlers.utils.ExceptionLevel.WARN)).
  To configure the severity to raise exceptions, set `exception_level` to 
[`ExceptionLevel.RAISE`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.utils.html#apache_beam.transforms.enrichment_handlers.utils.ExceptionLevel.RAISE).
 To ignore exceptions, set `exception_level` to 
[`ExceptionLevel.QUIET`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.utils.html#apache_beam.transforms.enrichment_handlers.utils.ExceptionLevel.QUIET).\n",
         "\n",
-        "The default `encoding` type is `utf-8`.\n",
+        "The following example demonstrates how to set exception level in 
`BigTableEnrichmentHandler`:\n",
         "\n",
-        "\n"
+        "```\n",
+        "bigtable_handler = 
BigTableEnrichmentHandler(project_id=PROJECT_ID,\n",
+        "                                             
instance_id=INSTANCE_ID,\n",
+        "                                             table_id=TABLE_ID,\n",
+        "                                             row_key=row_key,\n",
+        "                                             
exception_level=ExceptionLevel.RAISE)\n",
+        "```"
       ]
     },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "The key component of the Bigtable handler is the `row_key` parameter. 
The `row_key` represent the field in input schema (`beam.Row`) that contains 
the row key for a row in the table.\n",
+        "\n",
+        "As of Apache Beam version 2.54.0, if the table uses composite row 
keys, then you can:\n",

Review Comment:
   I've phrased this slightly different because users only need to do one of 
these steps



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to