Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions examples/notebooks/tour-of-beam/getting-started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"id": "h0UUmpwRADqA"
},
"source": [
"> ℹ️  In Beam, you can __NOT__ access the elements from a `PCollection` directly like a Python list.\n",
"> ℹ️ In Beam, you can __NOT__ access the elements from a `PCollection` directly like a Python list.\n",
"> This means, we can't simply `print` the output `PCollection` to see the elements.\n",
">\n",
"> This is because, depending on the runner,\n",
Expand Down Expand Up @@ -322,7 +322,7 @@
"\n",
"`map` takes a _function_ that transforms a single input `a` into a single output `b`.\n",
"\n",
"> ℹ️ -- For example, we want to multiply each element by 2."
"> ℹ️ For example, we want to multiply each element by 2."
]
},
{
Expand Down Expand Up @@ -441,7 +441,7 @@
"id": "Q06jvwmqOzer"
},
"source": [
"> ℹ️  Now that we know how `Map` works, we can see what's happening when we print the elements.\n",
"> ℹ️ Now that we know how `Map` works, we can see what's happening when we print the elements.\n",
">\n",
"> We have our outputs stored in the `outputs` `PCollection`, so we _pipe_ it to a `Map` transform to apply the\n",
"> [`print`](https://docs.python.org/3/library/functions.html#print)\n",
Expand Down Expand Up @@ -473,7 +473,7 @@
"`flatMap` takes a function that transforms a single input `a` into an `iterable` of outputs `b`.\n",
"But we get a _single collection_ containing the outputs of _all_ the elements.\n",
"\n",
"> ℹ️ -- For example, we want to have as many elements as the element's value.\n",
"> ℹ️ For example, we want to have as many elements as the element's value.\n",
"> For a value `1` we want one element, and three elements for a value `3`."
]
},
Expand Down Expand Up @@ -608,7 +608,7 @@
"`filter` takes a function that checks a single element `a`,\n",
"and returns `True` to keep the element, or `False` to discard it.\n",
"\n",
"> ℹ️ -- For example, we only want to keep number that are *even*, or divisible by two.\n",
"> ℹ️ For example, we only want to keep number that are *even*, or divisible by two.\n",
"> We can use the\n",
"> [modulo operator `%`](https://en.wikipedia.org/wiki/Modulo_operation)\n",
"> for a simple check."
Expand Down Expand Up @@ -729,7 +729,7 @@
"\n",
"Other common names for this function are `fold` and `reduce`.\n",
"\n",
"> ℹ️ -- For example, we want to add all numbers together."
"> ℹ️ For example, we want to add all numbers together."
]
},
{
Expand Down Expand Up @@ -851,7 +851,7 @@
"id": "pFb98ioSp9YU"
},
"source": [
"> ℹ️  There are many ways to combine values in Beam.\n",
"> ℹ️ There are many ways to combine values in Beam.\n",
"> You could even combine them into a different data type by defining a custom `CombineFn`.\n",
">\n",
"> You can learn more about them by checking the available\n",
Expand All @@ -874,7 +874,7 @@
"but instead of replacing the value on a \"duplicate\" key,\n",
"you would get a list of all the values associated with that key.\n",
"\n",
"> ℹ️ -- For example, we want to group each animal with the list of foods they like, and we start with `(animal, food)` pairs."
"> ℹ️ For example, we want to group each animal with the list of foods they like, and we start with `(animal, food)` pairs."
]
},
{
Expand Down Expand Up @@ -1006,10 +1006,15 @@
"source": [
"# What's next?\n",
"\n",
"* [Transform catalog](https://beam.apache.org/documentation/transforms/python/overview/) -- check out all the available transforms\n",
"* [Using I/O transforms](https://beam.apache.org/documentation/programming-guide/#pipeline-io) -- learn how to read/write data to/from external sources and sinks like text files or databases\n",
"* [Mobile gaming example](https://beam.apache.org/get-started/mobile-gaming-example/) -- learn more about windowing, triggers, and streaming through a complete example pipeline\n",
"* [Runners](https://beam.apache.org/documentation/runners/capability-matrix/) -- check the available runners, their capabilities, and how to run your pipeline in them"
"* ![Open in Colab](https://github.com/googlecolab/open_in_colab/raw/main/images/icon16.png)\n",
" [Reading and writing data](https://colab.research.google.com/github/apache/beam/blob/master/examples/notebooks/tour-of-beam/reading-and-writing-data.ipynb) --\n",
" how to read and write data to and from different data formats. \n",
"* [Transform catalog](https://beam.apache.org/documentation/transforms/python/overview) --\n",
" check out all the available transforms.\n",
"* [Mobile gaming example](https://beam.apache.org/get-started/mobile-gaming-example) --\n",
" learn more about windowing, triggers, and streaming through a complete example pipeline.\n",
"* [Runners](https://beam.apache.org/documentation/runners/capability-matrix) --\n",
" check the available runners, their capabilities, and how to run your pipeline in them."
]
}
]
Expand Down
Loading