[ 
https://issues.apache.org/jira/browse/BEAM-9650?focusedWorklogId=417956&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-417956
 ]

ASF GitHub Bot logged work on BEAM-9650:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Apr/20 20:27
            Start Date: 07/Apr/20 20:27
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on pull request #11182: [BEAM-9650] 
Add PeriodicImpulse Transform and slowly changing side input documentation
URL: https://github.com/apache/beam/pull/11182#discussion_r405090695
 
 

 ##########
 File path: website/src/documentation/patterns/side-inputs.md
 ##########
 @@ -45,4 +45,30 @@ For instance, the following code sample uses a `Map` to 
create a `DoFn`. The `Ma
 ```java
 {% github_sample 
/apache/beam/blob/master/examples/java/src/main/java/org/apache/beam/examples/snippets/Snippets.java
 tag:SideInputPatternSlowUpdateGlobalWindowSnip1
 %}
-```
\ No newline at end of file
+```
+
+
+## Slowly updating side input using windowing
+
+You can read side input pcollection periodically into distinct windows.
+Later, when you apply side input to your main input, windows will be matched 
automatically 1:1.
+This way, you can guarantee side input consistency on the duration of the 
single window.
+
+To do this, you can utilize PeriodicSequence PTransform that will generate 
infinite sequence
+of elements with some real-time period:
+
+1. Use the PeriodicImpulse transform to genearate windowed periodic sequence.
+
+    a. MAX_TIMESTAMP can be replaced with some closer boundary if you want to 
stop generating elements at some point.
+
+1. Read data using Read operation triggered by arrival of PCollection element.
+
+1. Apply side input.
+
+```python
+{% github_sample 
/apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets.py 
tag:SideInputSlowUpdateSnip1
+%}
 
 Review comment:
   I feel that it may be best to get a tech writer review for this. @rosetn 
@soyrice can one of you validate this doc section?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 417956)
    Time Spent: 1h 50m  (was: 1h 40m)

> Add consistent slowly changing side inputs support
> --------------------------------------------------
>
>                 Key: BEAM-9650
>                 URL: https://issues.apache.org/jira/browse/BEAM-9650
>             Project: Beam
>          Issue Type: Bug
>          Components: io-ideas
>            Reporter: Mikhail Gryzykhin
>            Assignee: Mikhail Gryzykhin
>            Priority: Major
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Add implementation for slowly changing dimentions based on [design 
> doc](https://docs.google.com/document/d/1LDY_CtsOJ8Y_zNv1QtkP6AGFrtzkj1q5EW_gSChOIvg/edit]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to