You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2024/10/18 13:51:42 UTC
(beam) branch users/damccorm/docs created (now 10aa5629e83)
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a change to branch users/damccorm/docs
in repository https://gitbox.apache.org/repos/asf/beam.git
at 10aa5629e83 Enrichment pydoc improvements
This branch includes the following new commits:
new 10aa5629e83 Enrichment pydoc improvements
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(beam) 01/01: Enrichment pydoc improvements
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch users/damccorm/docs
in repository https://gitbox.apache.org/repos/asf/beam.git
commit 10aa5629e834fe9e03e6ace214f0ec0c63160d02
Author: Danny McCormick <da...@google.com>
AuthorDate: Fri Oct 18 09:51:28 2024 -0400
Enrichment pydoc improvements
---
sdks/python/apache_beam/yaml/yaml_enrichment.py | 62 +++++++++----------------
1 file changed, 21 insertions(+), 41 deletions(-)
diff --git a/sdks/python/apache_beam/yaml/yaml_enrichment.py b/sdks/python/apache_beam/yaml/yaml_enrichment.py
index 00f2a5c1b1d..9bea17f78fd 100644
--- a/sdks/python/apache_beam/yaml/yaml_enrichment.py
+++ b/sdks/python/apache_beam/yaml/yaml_enrichment.py
@@ -48,7 +48,19 @@ def enrichment_transform(
"""
The Enrichment transform allows you to dynamically
enhance elements in a pipeline by performing key-value
- lookups against external services like APIs or databases.
+ lookups against external services like APIs or databases.
+
+ Example Usage::
+
+ - type: Enrichment
+ config:
+ enrichment_handler: 'BigTable'
+ handler_config:
+ project_id: 'apache-beam-testing'
+ instance_id: 'beam-test'
+ table_id: 'bigtable-enrichment-test'
+ row_key: 'product_id'
+ timeout: 30
Args:
enrichment_handler: Specifies the source from
@@ -58,46 +70,14 @@ def enrichment_transform(
"BigTable", "FeastFeatureStore",
"VertexAIFeatureStore"].
handler_config: Specifies the parameters for
- the respective enrichment_handler in a dictionary format.
- BigQuery = (
- "BigQuery: "
- "project, table_name, row_restriction_template, "
- "fields, column_names, "condition_value_fn, "
- "query_fn, min_batch_size, max_batch_size"
- )
-
- BigTable = (
- "BigTable: "
- "project_id, instance_id, table_id, "
- "row_key, row_filter, app_profile_id, "
- "encoding, ow_key_fn, exception_level, include_timestamp"
- )
-
- FeastFeatureStore = (
- "FeastFeatureStore: "
- "feature_store_yaml_path, feature_names, "
- "feature_service_name, full_feature_names, "
- "entity_row_fn, exception_level"
- )
-
- VertexAIFeatureStore = (
- "VertexAIFeatureStore: "
- "project, location, api_endpoint, feature_store_name, "
- "feature_view_name, row_key, exception_level"
- )
-
- Example Usage:
-
- - type: Enrichment
- config:
- enrichment_handler: 'BigTable'
- handler_config:
- project_id: 'apache-beam-testing'
- instance_id: 'beam-test'
- table_id: 'bigtable-enrichment-test'
- row_key: 'product_id'
- timeout: 30
-
+ the respective enrichment_handler in a dictionary format.
+ To see the full set of handler_config parameters, see
+ their corresponding doc pages:
+
+ - :class:`~apache_beam.transforms.enrichment_handlers.bigquery.BigQueryEnrichmentHandler` # pylint: disable=line-too-long
+ - :class:`~apache_beam.transforms.enrichment_handlers.bigtable.BigTableEnrichmentHandler` # pylint: disable=line-too-long
+ - :class:`~apache_beam.transforms.enrichment_handlers.feast_feature_store.FeastFeatureStoreEnrichmentHandler` # pylint: disable=line-too-long
+ - :class:`~apache_beam.transforms.enrichment_handlers.vertex_ai_feature_store.VertexAIFeatureStoreEnrichmentHandler` # pylint: disable=line-too-long
"""
options.YamlOptions.check_enabled(pcoll.pipeline, 'Enrichment')