You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ah...@apache.org on 2026/05/04 20:41:49 UTC

(beam) branch master updated: [ValueKind] Add to model (#38308)

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

ahmedabu98 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 a5496c61a0f [ValueKind] Add to model (#38308)
a5496c61a0f is described below

commit a5496c61a0f71d9b97ca080b9327ea08fa625c46
Author: Ahmed Abualsaud <65...@users.noreply.github.com>
AuthorDate: Mon May 4 16:41:41 2026 -0400

    [ValueKind] Add to model (#38308)
    
    * add valuekind to model
    
    * add unspecified first value
---
 .../beam/model/fn_execution/v1/beam_fn_api.proto   | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto b/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto
index 22b19ef0328..ecef3f2e7a9 100644
--- a/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto
+++ b/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto
@@ -757,6 +757,29 @@ message Elements {
     }
   }
 
+  // The type of change operation represented by a Change Data Capture (CDC) record
+  message ValueKind {
+    enum Enum {
+      // Unspecified ValueKind. Will be treated as an INSERT
+      VALUE_KIND_UNSPECIFIED = 0;
+
+      // Indicates a new record was created in the source system.
+      INSERT = 1;
+
+      // Indicates the state of a record immediately <b>before</b> an update occurred.
+      // This is typically used to identify the previous values of modified columns
+      // or to locate the record via its primary key.
+      UPDATE_BEFORE = 2;
+
+      // Indicates the state of a record immediately after an update occurred.
+      // Represents the current, valid state of the record following the change.
+      UPDATE_AFTER = 3;
+
+      // Indicates that an existing record was removed from the source system.
+      DELETE = 4;
+    }
+  }
+
   // Element metadata passed as part of WindowedValue to make WindowedValue
   // extensible and backward compatible
   message ElementMetadata {
@@ -770,6 +793,9 @@ message Elements {
     // across IOs - Kafka, PubSub, http.
     // Example value: congo=t61rcWkgMzE
     optional string tracestate = 3;
+    // (Optional) The kind of value for CDC metadata.
+    // If missing or unspecified, implies INSERT for backwards compatibility.
+    optional ValueKind.Enum value_kind = 4;
   }
 
   // Represent the encoded user timer for a given instruction, transform and