This is an automated email from the ASF dual-hosted git repository.
yhu 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 c7937001981 Beam YAML day zero notebook save file fix (#31266)
c7937001981 is described below
commit c7937001981bf6c6f8580071b506064d57af6e52
Author: Jeff Kinard <[email protected]>
AuthorDate: Tue May 14 10:43:24 2024 -0400
Beam YAML day zero notebook save file fix (#31266)
Signed-off-by: Jeffrey Kinard <[email protected]>
---
.../notebooks/get-started/try-apache-beam-yaml.ipynb | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb
b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb
index 2dfa9222ebb..ed702cf3ef4 100644
--- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb
+++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb
@@ -376,7 +376,7 @@
},
"outputs": [],
"source": [
- "pipeline = '''\n",
+ "%%writefile 'pipelines/pipeline-map-01.yaml'\n",
"pipeline:\n",
" type: chain\n",
" transforms:\n",
@@ -389,12 +389,20 @@
" append: true\n",
" fields:\n",
" is_adult: \"age >= 18\"\n",
- " - type: LogForTesting\n",
- "'''\n",
- "save_to_file(pipeline, 'pipelines/pipeline-map-01.yaml')\n",
- "! python -m apache_beam.yaml.main
--pipeline_spec_file=pipelines/pipeline-map-01.yaml"
+ " - type: LogForTesting\n"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "! python -m apache_beam.yaml.main
--pipeline_spec_file=pipelines/pipeline-map-01.yaml"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
{
"cell_type": "markdown",
"metadata": {},