soyrice commented on a change in pull request #11182: [BEAM-9650] Add 
PeriodicImpulse Transform and slowly changing side input documentation
URL: https://github.com/apache/beam/pull/11182#discussion_r408198694
 
 

 ##########
 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 generate windowed periodic sequence.
+
+    a. MAX_TIMESTAMP can be replaced with some closer boundary if you want to 
stop generating elements at some point.
 
 Review comment:
   MAX_TIMESTAMP is a parameter, right? If so, let's put it in code font. I 
think "PeriodicImpulse" in the list item above and "Read" (from "Read 
operation) in the list item below should also be in code font. Putting "Read" 
in code font will help distinguish it from the word "read," which is also in 
the sentence.
   
   We can also simplify this sentence a bit: "To stop generating elements, 
replace MAX_TIMESTAMP with some closer boundary" or "You can replace 
MAX_TIMESTAMP with..." or something like that

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to