You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tv...@apache.org on 2026/10/16 17:07:25 UTC

(beam) branch master updated: [Python] Document the import-time default of PeriodicImpulse start_timestamp (#40599)

This is an automated email from the ASF dual-hosted git repository.

tvalentyn 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 964d15b47a4 [Python] Document the import-time default of PeriodicImpulse start_timestamp (#40599)
964d15b47a4 is described below

commit 964d15b47a48b70d3536c33c55edbc95a4a318a3
Author: raams95 <ja...@gmail.com>
AuthorDate: Fri Oct 16 12:07:18 2026 -0500

    [Python] Document the import-time default of PeriodicImpulse start_timestamp (#40599)
    
    The default start_timestamp of PeriodicImpulse and MatchContinuously is
    evaluated once, when the module is imported. As discussed in #40565 the
    default stays as is, so document it and point to an explicit timestamp
    or rebase for starting relative to pipeline execution.
    
    Fixes #40564
    
    Co-authored-by: JanakiRamChittineni <34...@users.noreply.github.com>
---
 sdks/python/apache_beam/io/fileio.py                   | 3 ++-
 sdks/python/apache_beam/transforms/periodicsequence.py | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/sdks/python/apache_beam/io/fileio.py b/sdks/python/apache_beam/io/fileio.py
index fcce83fa59e..23d0f8c10c1 100644
--- a/sdks/python/apache_beam/io/fileio.py
+++ b/sdks/python/apache_beam/io/fileio.py
@@ -404,7 +404,8 @@ class MatchContinuously(beam.PTransform):
       file_pattern: The file path to read from.
       interval: Interval at which to check for files in seconds.
       has_deduplication: Whether files already read are discarded or not.
-      start_timestamp: Timestamp for start file checking.
+      start_timestamp: Timestamp for start file checking. Defaults to the time
+        this module was first imported, not the time the transform is created.
       stop_timestamp: Timestamp after which no more files will be checked.
       match_updated_files: (When has_deduplication is set to True) whether match
         file with timestamp changes.
diff --git a/sdks/python/apache_beam/transforms/periodicsequence.py b/sdks/python/apache_beam/transforms/periodicsequence.py
index 7b90fa3bb2f..2513885e75d 100644
--- a/sdks/python/apache_beam/transforms/periodicsequence.py
+++ b/sdks/python/apache_beam/transforms/periodicsequence.py
@@ -299,7 +299,10 @@ class PeriodicImpulse(PTransform):
       data: Optional[Sequence[Any]] = None,
       rebase: RebaseMode = RebaseMode.REBASE_NONE):
     '''
-    :param start_timestamp: Timestamp for first element.
+    :param start_timestamp: Timestamp for first element. Defaults to the time
+      this module was first imported, not the time the transform is created
+      or the pipeline starts. Pass an explicit timestamp, or use `rebase`, to
+      start relative to pipeline execution.
     :param stop_timestamp: Timestamp at or after which no elements will be
       output.
     :param fire_interval: Interval in seconds at which to output elements.