Back to results
US 2021/0240690 A1Published application
Streams on shared database objects
AssigneeSnowflake Inc.
InventorsIstvan Cseri, Dinesh Chandrakant Kulkarni
Life of this patent
Estimating the term…
Abstract
A database platform can track changes using a stream that records changes made by database transactions. Streams on views can be implemented by applying a stream to source data, and applying the view to the streamed data. Users of the database platform can query the stream on the view to review recent changes to the view, such as changes made since the last database transaction.
Claims35
A method comprising:
- identifying, by one or more processors of a machine, a database view of one or more source tables of a database platform, the database view comprising a table definition specifying data to include in the database view from the one or more source tables;
- receiving a query that specifies a database stream object to be applied to the database view to track changes made to the database view, the database stream object recording one or more row level changes to the database view caused by one or more database transactions, the one or more row level changes being tracked in a change table of the database stream object;
- and
- in response to the query, performing query expansion to rearrange a query plan such that the database stream object is applied to the one or more source tables and the database view is applied to the change table;
- receiving an additional query for change data from the database stream object;
- generating, using the rearranged query plan, the change data by generating intermediate change data by applying the additional query to the change table that tracks changes made to the one or more source tables and applying the database view on the intermediate change data to generate the change data;
- and
- storing the change data.
5 more elements
(canceled)
(canceled)
A system comprising:
- one or more processors of a machine;
- and
- a memory storing instructions that, when executed by the one or more processors, cause the machine to perform operations comprising:
- identifying, in a database platform, a database view of one or more source tables, the database view comprising a table definition specifying data to include in the database view from the one or more source tables;
- receiving a query that specifies a database stream object to be applied to the database view to track changes made to the database view, the database stream object recording one or more row level changes to the database view caused by one or more database transactions, the one or more row level changes being tracked in a change table of the database stream object;
- and
- in response to the query, performing query expansion to rearrange a query plan such that the database stream object is applied to the one or more source tables and the database view is applied to the change table;
- receiving an additional query for change data from the database stream object;
- generating, using the rearranged query plan, the change data by generating intermediate change data by applying the additional query to the change table that tracks changes made to the one or more source tables and applying the database view on the intermediate change data to generate the change data;
- and
- storing the change data.
8 more elements
(canceled)
(canceled)
A machine storage medium embodying instructions that,
- when executed by a machine, cause the machine to perform operations comprising:
- identifying, in a database platform, a database view of one or more source tables, the database view comprising a table definition specifying data to include in the database view from the one or more source tables;
- receiving a query that specifies a database stream object to be applied to the database view to track changes made to the database view, the database stream object recording one or more row level changes to the database view caused by one or more database transactions, the one or more row level changes being tracked in a change table of the database stream object;
- and
- in response to the query, performing query expansion to rearrange a query plan such that the database stream object is applied to the one or more source tables and the database view is applied to the change table;
- receiving an additional query for change data from the database stream object;
- generating, using the rearranged query plan, the change data by generating intermediate change data by applying the additional query to the change table that tracks changes made to the one or more source tables and applying the database view on the intermediate change data to generate the change data;
- and
- storing the change data.
6 more elements
(canceled)
Dependencies are inferred from the claim text.