diff --git a/sdks/python/apache_beam/yaml/examples/bigtable_enrichment.yaml b/sdks/python/apache_beam/yaml/examples/bigtable_enrichment.yaml index daaafe0d4031..788b69de7857 100644 --- a/sdks/python/apache_beam/yaml/examples/bigtable_enrichment.yaml +++ b/sdks/python/apache_beam/yaml/examples/bigtable_enrichment.yaml @@ -48,5 +48,8 @@ pipeline: # We can also store it somewhere like a json file - type: LogForTesting - # Expected: - # Row(sale_id = 1, customer_id = 1, product_id = 1, quantity = 1, product = Row(product_id: "1", product_name = "pixel 5", product_stock = "2")) +options: + yaml_experimental_features: Enrichment + +# Expected: +# Row(sale_id=1, customer_id=1, product_id=1, quantity=1, product={'product_id': '1', 'product_name': 'pixel 5', 'product_stock': '2'}) \ No newline at end of file diff --git a/sdks/python/apache_beam/yaml/examples/enrich_spanner_with_bigquery.yaml b/sdks/python/apache_beam/yaml/examples/enrich_spanner_with_bigquery.yaml index 96ddd65afa06..56d1408f0818 100644 --- a/sdks/python/apache_beam/yaml/examples/enrich_spanner_with_bigquery.yaml +++ b/sdks/python/apache_beam/yaml/examples/enrich_spanner_with_bigquery.yaml @@ -94,3 +94,6 @@ pipeline: config: path: 'errors.json' +# Expected: +# Row(customer_id=1001, customer_name='Alice', customer_email='alice@gmail.com', product_id=2001, order_date='24-03-24', order_amount=150) +# Row(customer_id=1003, customer_name='Claire', customer_email='claire@gmail.com', product_id=2003, order_date='7-05-24', order_amount=110) diff --git a/sdks/python/apache_beam/yaml/examples/testing/examples_test.py b/sdks/python/apache_beam/yaml/examples/testing/examples_test.py index 3b497ed1efab..c75d21f79eb0 100644 --- a/sdks/python/apache_beam/yaml/examples/testing/examples_test.py +++ b/sdks/python/apache_beam/yaml/examples/testing/examples_test.py @@ -213,9 +213,11 @@ def _wordcount_test_preprocessor( 'test_simple_filter_yaml', 'test_simple_filter_and_combine_yaml', 'test_spanner_read_yaml', - 'test_spanner_write_yaml' + 'test_spanner_write_yaml', + 'test_bigtable_enrichment_yaml', + 'test_enrich_spanner_with_bigquery_yaml' ]) -def _io_write_test_preprocessor( +def _file_io_write_test_preprocessor( test_spec: dict, expected: List[str], env: TestEnvironment): if pipeline := test_spec.get('pipeline', None):