# US 2022/0292115 A1 · Materialized view sub-database replication

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292115 A1
- Document ID: US20220292115A1
- Status: Published application
- Kind: A1
- Application number: 17/804,753
- Filed: 2022-05-31
- Published: 2022-09-15
- Earliest claimed: 2020-05-29
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Pui Kei Johnston Chu; Shreyas Narendra Desai; German Alberto Gil Echeverri; Prasanna Krishnan; Nithin Mahesh; Subramanian Muralidhar; Eric Robinson; Sahaj Saini
- Web page: https://patentgrep.com/patent/US20220292115A1

## CPC

- G06F 16/275: {Synchronous replication}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06Q 30/0185: {Product, service or business identity fraud}
- G06Q 30/0205: {based on location or geographical consideration}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR

## Abstract

A system for sub-table replication within a materialized view of a source data table. A materialized view of a source data table is generated based on a query, the source data table having a plurality of data table rows associated with a plurality of client identifiers and including an entitlements column and data content, the entitlements column including a plurality of provider account identifiers and a plurality of consumer account identifiers. An update to an entitlements table of the source data table is detected where the entitlements table includes a plurality of entitlements table rows and where the entitlements table rows are associated with the client identifiers, the consumer account identifiers, and the provider account identifiers. An update to the source data table based on the first update to the entitlements table is detected, and an incremental replication of the materialized view of the source data table is performed.

## Claims

### Claim 1

A method of implementing data table replication, the method comprising:
generating a materialized view of a source data table based on a query, the source data table comprising a plurality of data table rows associated with a plurality of client identifiers and including an entitlements column and data content, the entitlements column including a plurality of provider account identifiers and a plurality of consumer account identifiers;
detecting, by a processor, a first update to an entitlements table of the source data table,
the entitlements table comprising a plurality of entitlements table rows, the entitlements table rows being associated with the client identifiers, the consumer account identifiers, and the provider account identifiers, and
the first update to the entitlements table being associated with an entitlements table row of the entitlement table rows;
detecting, by the processor, an update to the source data table based on the first update to the entitlements table; and
performing, by the processor, an incremental replication of the materialized view of the source data table on the basis of detecting the update to the source data table.

### Claim 2 (depends on 1)

The method of claim 1, the method further comprising:
file-level filtering, by the processor, of the data table based on a second update to the entitlements table,
wherein the second update is associated with a first entitlements table row of the entitlements table rows, the second update including a first client identifier of the client identifiers, a first consumer account identifier of the consumer account identifiers, or a first provider account identifier of the provider account identifiers, and
wherein the file-level filtering comprises:
identifying micro-partitions in a plurality of micro-partitions in the data table having metadata associated with the first client identifier, each of the micro-partitions in the data table comprising one or more of the plurality of data table rows; and
replicating the identified micro-partitions to a first provider account of the materialized view of the source data table associated with the first provider account identifier.

### Claim 3 (depends on 2)

The method of claim 2, wherein each of the plurality of micro-partitions in the data table comprises metadata including a minimum client identifier and maximum client identifier.

### Claim 4 (depends on 3)

The method of claim 3, wherein the metadata is associated with the first client identifier when the first client identifier is within a range established by the minimum client identifier and the maximum client identifier.

### Claim 5 (depends on 1)

The method of claim 1, wherein the plurality of provider account identifiers identify provider accounts in a plurality of geographic regions.

### Claim 6 (depends on 1)

The method of claim 1, wherein the entitlements table further comprises a plurality of entitlements table columns storing the consumer account identifiers and the provider account identifiers.

### Claim 7 (depends on 1)

The method of claim 1, further comprising: receiving a replication request from the first provider account, the replication request including a first consumer account identifier.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first update to the entitlements table includes adding a new entitlements table row to the entitlements table, deleting one of the entitlements table rows, or altering information included in one of the entitlements table rows.

### Claim 9 (depends on 8)

The method of claim 8, wherein altering information included in one of the entitlements table rows includes altering the client identifiers, consumer account identifiers, or provider account identifiers.

### Claim 10

A system implementing sub-table replication comprising:
a processor; and
a memory having instructions stored therein, when executed by the processor, causes the system to perform operations comprising:
generating a materialized view of a source data table based on a query, the source data table comprising a plurality of data table rows associated with a plurality of client identifiers and including an entitlements column and data content, the entitlements column including a plurality of provider account identifiers and a plurality of consumer account identifiers;
detecting a first update to an entitlements table of the source data table,
the entitlements table comprising a plurality of entitlements table rows, the entitlements table rows being associated with the client identifiers, the consumer account identifiers, and the provider account identifiers, and
the first update to the entitlements table being associated with an entitlements table row of the entitlement table rows;
detecting an update to the source data table based on the first update to the entitlements table; and
performing an incremental replication of the materialized view of the source data table on the basis of detecting the first update to the source data table.

### Claim 11 (depends on 10)

The system of claim 10, wherein the instructions, when executed by the processor, further cause the system to perform operations comprising:
file-level filtering of the data table based on a second update to the entitlements table,
wherein the second update is associated with a first entitlements table row of the entitlements table rows, the second update including a first client identifier of the client identifiers, a first consumer account identifier of the consumer account identifiers, or a first provider account identifier of the provider account identifiers, and
wherein the file-level filtering comprises:
identifying micro-partitions in a plurality of micro-partitions in the data table having metadata associated with the first client identifier, each of the micro-partitions in the data table comprising one or more of the plurality of data table rows; and
replicating the identified micro-partitions to a first provider account of the materialized view of the source data table associated with the first provider account identifier.

### Claim 12 (depends on 11)

The system of claim 11, wherein each of the plurality of micro-partitions in the data table comprises metadata including a minimum client identifier and maximum client identifier.

### Claim 13 (depends on 12)

The system of claim 12, wherein the metadata is associated with the first client identifier when the first client identifier is within a range established by the minimum client identifier and the maximum client identifier.

### Claim 14 (depends on 10)

The system of claim 10, wherein the plurality of provider account identifiers identify provider accounts in a plurality of geographic regions.

### Claim 15 (depends on 10)

The system of claim 10, wherein the entitlements table further comprises a plurality of entitlements table columns storing the consumer account identifiers and the provider account identifiers.

### Claim 16 (depends on 10)

The system of claim 10, wherein the instructions, when executed by the processor, further cause the system to perform operations comprising: receiving a replication request from the first provider account, the replication request including a first consumer account identifier.

### Claim 17 (depends on 10)

The system of claim 10, wherein the first update to the entitlements table includes adding a new entitlements table row to the entitlements table, deleting one of the entitlements table rows, or altering information included in one of the entitlements table rows.

### Claim 18 (depends on 17)

The system of claim 17, wherein altering information included in one of the entitlements table rows includes altering the client identifiers, consumer account identifiers, or provider account identifiers.

### Claim 19

A non-transitory computer-readable storage medium including instructions that, when processed by a computer, configure the computer to perform operations comprising:
generating a materialized view of a source data table based on a query, the source data table comprising a plurality of data table rows associated with a plurality of client identifiers and including an entitlements column and data content, the entitlements column including a plurality of provider account identifiers and a plurality of consumer account identifiers;
detecting a first update to an entitlements table of the source data table,
the entitlements table comprising a plurality of entitlements table rows, the entitlements table rows being associated with the client identifiers, the consumer account identifiers, and the provider account identifiers, and
the first update to the entitlements table being associated with an entitlements table row of the entitlement table rows;
detecting an update to the source data table based on the first update to the entitlements table; and
performing an incremental replication of the materialized view of the source data table on the basis of detecting the first update to the source data table.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the instructions, when processed by the computer, further configure the computer to perform operations comprising:
file-level filtering, by the processor, of the data table based on a second update to the entitlements table,
wherein the second update is associated with a first entitlements table row of the entitlements table rows, the second update including a first client identifier of the client identifiers, a first consumer account identifier of the consumer account identifiers, or a first provider account identifier of the provider account identifiers, and
wherein the file-level filtering comprises:
identifying micro-partitions in a plurality of micro-partitions in the data table having metadata associated with the first client identifier, each of the micro-partitions in the data table comprising one or more of the plurality of data table rows; and
replicating the identified micro-partitions to a first provider account of the materialized view of the source data table associated with the first provider account identifier.

### Claim 21 (depends on 20)

The non-transitory computer-readable storage medium of claim 20, wherein performing file-level filtering further comprises: identifying micro-partitions in a plurality of micro-partitions in the data table having metadata associated with the first client identifier.

### Claim 22 (depends on 21)

The non-transitory computer-readable storage medium of claim 21, wherein performing file-level filtering further comprises: replicating the identified micro-partitions to a first provider account associated with the first provider account identifier.

### Claim 23 (depends on 22)

The non-transitory computer-readable storage medium of claim 22, wherein each of the micro-partitions in the data table comprising one or more of the plurality of data table rows.

### Claim 24 (depends on 23)

The non-transitory computer-readable storage medium of claim 23, wherein each of the plurality of micro-partitions in the data table comprises metadata including a minimum client identifier and maximum client identifier.

### Claim 25 (depends on 24)

The non-transitory computer-readable storage medium of claim 24, wherein the metadata is associated with the first client identifier when the first client identifier is within a range established by the minimum client identifier and the maximum client identifier.

### Claim 26 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the plurality of provider account identifiers identify provider accounts in a plurality of geographic regions.

### Claim 27 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the entitlements table further comprises a plurality of entitlements table columns storing the consumer account identifiers and the provider account identifiers.

### Claim 28 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the instructions, when processed by the computer, further configure the computer to perform operations comprising: receiving a replication request from the first provider account, the replication request including a first consumer account identifier.

### Claim 29 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the first update to the entitlements table includes adding a new entitlements table row to the entitlements table, deleting one of the entitlements table rows, or altering information included in one of the entitlements table rows.

### Claim 30 (depends on 29)

The non-transitory computer-readable storage medium of claim 29, wherein altering information included in one of the entitlements table rows includes altering the client identifiers, consumer account identifiers, or provider account identifiers.
