From 594846de5a996cd86418143eb292cb7c7fd8d1fc Mon Sep 17 00:00:00 2001 From: JanakiRamChittineni <341781521+raams95@users.noreply.github.com> Date: Wed, 14 Oct 2026 19:50:28 -0500 Subject: [PATCH] [Python] Document the import-time default of PeriodicImpulse start_timestamp 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 --- 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 fcce83fa59ec..23d0f8c10c1a 100644 --- a/sdks/python/apache_beam/io/fileio.py +++ b/sdks/python/apache_beam/io/fileio.py @@ -404,7 +404,8 @@ def __init__( 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 7b90fa3bb2fa..2513885e75dc 100644 --- a/sdks/python/apache_beam/transforms/periodicsequence.py +++ b/sdks/python/apache_beam/transforms/periodicsequence.py @@ -299,7 +299,10 @@ def __init__( 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.