Hey everyone, Surfacing a question raised from the doc regarding how users should ask for a table's changelog. I'd like more input before building it.
*Option 1*: a clause after the table name (similar to Spark, Snowflake) SELECT * FROM cat.db.table *CHANGES* FROM VERSION 123 TO VERSION 456; SELECT * FROM cat.db.table *CHANGES* FROM TIMESTAMP '2026-10-01' TO TIMESTAMP '2026-10-12'; *Option 2*: a table function (similar to BigQuery, Databricks) SELECT * FROM *CHANGES(*cat.db.table, 123, 456*);* SELECT * FROM *CHANGES(*cat.db.table, '2026-10-01', '2026-10-12'*);* Which syntax would you prefer, and why? More examples are in the doc <https://docs.google.com/document/d/1k_RBQmSvf0H5ZayRf2E_oUK1HpcBwryiJBH5BJv2mwA/edit?tab=t.0> if that helps. On Wed, Oct 7, 2026 at 1:30 PM Ahmed Abualsaud <[email protected]> wrote: > Hey everyone, > > > I'd like to propose two additions to how Beam SQL refers to a table: > > 1. *CHANGES*, to read a table's row-level changes instead of its current > contents: > > SELECT * FROM cat.db.orders CHANGES FROM VERSION 1 TO VERSION 5 > > 2. *WITH*, to set connector options for one query: > > INSERT INTO cat.db.events WITH ('distribution_mode' = 'hash') SELECT ... > > Both follow Spark SQL's syntax (SPARK-55948 > <https://issues.apache.org/jira/browse/SPARK-55948> and SPARK-36680 > <https://issues.apache.org/jira/browse/SPARK-36680>) and would improve > ease of use. > > More details and example usage in the doc. Comments and suggestions are > welcome! > > > > https://docs.google.com/document/d/1k_RBQmSvf0H5ZayRf2E_oUK1HpcBwryiJBH5BJv2mwA/edit > > Thanks, > > Ahmed > >
