Skip to content
Open
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
27 changes: 27 additions & 0 deletions website/www/site/content/en/documentation/programming-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4229,6 +4229,15 @@ output_pc = input_pc | beam.Select(post_code=lambda item: str(item["shipping_add
Support for wildcards hasn't been developed for the Python SDK yet.
{{< /paragraph >}}

<< paragraph class="language-py" >>
Example of selecting all nested fields using wildcard:
<< /paragraph >>

<< highlight py >>
input_pc = ...
output_pc = input_pc | beam.Select("shippingAddress.*")
<< /highlight >>

{{< paragraph class="language-go">}}
Support for wildcards hasn't been developed for the Go SDK yet.
{{< /paragraph >}}
Expand Down Expand Up @@ -4259,6 +4268,15 @@ selected, the result is an array of the selected subfield type. For example
Support for Array fields hasn't been developed for the Python SDK yet.
{{< /paragraph >}}

{{< paragraph class="language-py" >}}
example of selecting a nested field inside an array:
{{< /paragraph >}}

<< highlight py >>
input_pc = ...
output_pc = input_pc | beam.Select("transactions[].bank")
<< /highlight py >>

{{< paragraph class="language-go">}}
Support for Array fields hasn't been developed for the Go SDK yet.
{{< /paragraph >}}
Expand Down Expand Up @@ -4287,6 +4305,15 @@ arrays, the use of {} curly brackets in the selector is recommended, to make it
selected, they can be omitted for brevity. In the future, map key selectors will be supported, allowing selection of
specific keys from the map. For example, given the following schema:

<< paragraph class="language-py" >>
Example of selecting a specific key from a map field:
<< /paragraph >>

<< highlight py >>
input_pc = ...
output_pc = input_pc | beam.Select("purchasesByType['electronics']")
<< /highlight >>

**PurchasesByType**

<table class="table-wrapper--pr">
Expand Down
Loading