IP Library Granted Patent US 11,194,795
Granted Patent B2
US 11,194,795 · App. 16/385,837 · Granted Dec 7, 2021

Automated maintenance of external tables in database systems

Inventors: Subramanian Muralidhar (Mercer Island, WA); Benoit Dageville (Foster City, CA); Thierry Cruanes (San Mateo, CA); Nileema Shingte (Bellevue, WA); Saurin Shah (Kirkland, WA); Torsten Grabs (Seattle, WA); Istvan Cseri (Seattle, WA)
Assignee: Snowflake Inc.
G06F16/2423G06F3/0605G06F3/067G06F3/0644G06F3/0653G06F9/542G06F16/164G06F16/2282G06F16/2393G06F16/256
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,194,795
App. No.
16/385,837
Filed
Apr 16, 2019
Granted
Dec 7, 2021
Kind
B2
Art Unit
2168
USPC
707/736
Abstract

Systems, methods, and devices for automated maintenance of external tables in database systems are disclosed. A method includes receiving, by a database platform, read access to content in an external data storage platform that is separate from the database platform. The method includes defining an external table based on the content in the external data storage platform. The method includes connecting the database platform to the external table such that the database platform has read access for the external table and does not have write access for the external table. The method includes generating metadata for the external table, the metadata comprising information about data stored in the external table. The method includes receiving a notification that a modification has been made to the content in the external data storage platform, the modification comprising one or more of an addition of a file, a deletion of a file, or an update to a file in a source location for the external table. The method includes refreshing the metadata for the external table in response to the modification being made to the content in the external data storage platform.

Claims (85)

1. A method performed by a database platform executing instructions on at least one hardware processor, the method comprising:

receiving an indication of a hierarchical structure of content that is stored in an external data storage platform that is separate from the database platform and to which the database platform does not have write access, the indication of the hierarchical structure listing a plurality of content-storage locations in which the content is stored among a plurality of levels of the hierarchical structure;

defining, by the database platform, an external-data-mapping table for the content, the external-data-mapping table being stored in the database platform;

generating metadata for the external-data-mapping table, the metadata comprising information about data stored in the external-data-mapping table, the metadata for the external-data-mapping table also being stored in the database platform, the metadata for the external-table organizing the external-data-mapping table into partitions according to the plurality of content-storage locations listed in the indication of the hierarchical structure;

receiving a notification that a modification has been made to a certain content-storage location within the plurality of content-storage locations in the hierarchical structure;

identifying, from the generated metadata, a certain partition of the external-data-mapping table as corresponding to the certain content-storage location; and

refreshing, in response to receiving the notification, the metadata for the certain partition of the external-data-mapping table to reflect the modification.

2. The method of claim 1 , wherein generating the metadata comprises one or more of:

defining cumulative table metadata for the external-data-mapping table;

defining a grouping expression property for a grouping of the partitions in the external-data-mapping table;

defining an expression property for at least one of the partitions of the external-data-mapping table;

defining partition statistics for at least one of the partitions of the external-data-mapping table; and

defining a column expression property for at least one column of at least one of the partitions of the external-data-mapping table.

3. The method of claim 1 , further comprising storing the metadata in a partition storage object on a shared storage platform associated with the database platform, wherein the shared storage platform is separate from the external data storage platform.

4. The method of claim 1 , further comprising one or more of:

refreshing the metadata at threshold time periods;

refreshing the metadata in response to a threshold number of modifications being made to the content; and

refreshing the metadata in response to a request to refresh the metadata.

5. The method of claim 1 , further comprising reading multiple different file formats in the content in the external data storage platform.

6. The method of claim 1 , wherein receiving the notification comprises one or more of:

querying the external data storage platform to determine whether any modifications have been made to the content;

receiving the notification from the external data storage platform; and

receiving the notification from a client associated with the content.

7. The method of claim 1 , further comprising generating change tracking metadata for the certain partition, the change tracking metadata indicating how the certain content-storage location was modified and when the certain content-storage location was modified.

8. The method of claim 1 , the modification comprising one or more of an addition of a file, a deletion of a file, and an update to a file in the certain content-storage location.

9. The method of claim 1 , wherein:

the content-storage locations in the plurality of content-storage locations comprise folders and subfolders; and

the certain content-storage location comprises a certain subfolder.

10. One or more non-transitory computer readable storage media storing instructions that, when executed by one or more processors of a database platform, cause the one or more processors to perform operations comprising:

receiving an indication of a hierarchical structure of content that is stored in an external data storage platform that is separate from the database platform and to which the database platform does not have write access, the indication of the hierarchical structure listing a plurality of content-storage locations in which the content is stored among a plurality of levels of the hierarchical structure;

defining, by the database platform, an external-data-mapping table for the content, the external-data-mapping table being stored in the database platform;

generating metadata for the external-data-mapping table, the metadata comprising information about data stored in the external-data-mapping table, the metadata for the external-data-mapping table also being stored in the database platform, the metadata for the external-table organizing the external-data-mapping table into partitions according to the plurality of content-storage locations listed in the indication of the hierarchical structure;

receiving a notification that a modification has been made to a certain content-storage location within the plurality of content-storage locations in the hierarchical structure;

identifying, from the generated metadata, a certain partition of the external-data-mapping table as corresponding to the certain content-storage location; and

refreshing, in response to receiving the notification, the metadata for the certain partition of the external-data-mapping table to reflect the modification.

11. The non-transitory computer readable storage media of claim 10 , wherein generating the metadata comprises one or more of:

defining cumulative table metadata for the external-data-mapping table;

defining a grouping expression property for a grouping of the partitions in the external-data-mapping table;

defining an expression property for at least one of the partitions of the external-data-mapping table;

defining partition statistics for at least one of the partitions of the external-data-mapping table; and

defining a column expression property for at least one column of at least one of the partitions of the external-data-mapping table.

12. The non-transitory computer readable storage media of claim 10 , wherein the operations further comprise storing the metadata in a partition storage object on a shared storage platform associated with the database platform, wherein the shared storage platform is separate from the external data storage platform.

13. The non-transitory computer readable storage media of claim 10 , further comprising one or more of:

refreshing the metadata at threshold time periods;

refreshing the metadata in response to a threshold number of modifications being made to the content; and

refreshing the metadata in response to a request to refresh the metadata.

14. The non-transitory computer readable storage media of claim 10 , the operations further comprising reading multiple different file formats in the content in the external data storage platform.

15. The non-transitory computer readable storage media of claim 10 , wherein receiving the notification comprises one or more of:

querying the external data storage platform to determine whether any modifications have been made to the content;

receiving the notification from the external data storage platform; and

receiving the notification from a client associated with the content.

16. The non-transitory computer readable storage media of claim 10 , the operations further comprising generating change tracking metadata for the certain partition, the change tracking metadata indicating how the certain content-storage location was modified and when the certain content-storage location was modified.

17. The non-transitory computer readable storage media of claim 10 , the modification comprising one or more of an addition of a file, a deletion of a file, and an update to a file in the certain content-storage location.

18. The non-transitory computer readable storage media of claim 10 , wherein:

the content-storage locations in the plurality of content-storage locations comprise folders and subfolders; and

the certain content-storage location comprises a certain subfolder.

19. A database platform comprising:

at least one processor; and

one or more non-transitory computer readable storage media containing instructions executable by the at least one processor for causing the at least one processor to perform operations comprising:

receiving an indication of a hierarchical structure of content that is stored in an external data storage platform that is separate from the database platform and to which the database platform does not have write access, the indication of the hierarchical structure listing a plurality of content-storage locations in which the content is stored among a plurality of levels of the hierarchical structure;

defining, by the database platform, an external-data-mapping table for the content, the external-data-mapping table being stored in the database platform;

generating metadata for the external-data-mapping table, the metadata comprising information about data stored in the external-data-mapping table, the metadata for the external-data-mapping table also being stored in the database platform, the metadata for the external-table organizing the external-data-mapping table into partitions according to the plurality of content-storage locations listed in the indication of the hierarchical structure;

receiving a notification that a modification has been made to a certain content-storage location within the plurality of content-storage locations in the hierarchical structure;

identifying, from the generated metadata, a certain partition of the external-data-mapping table as corresponding to the certain content-storage location; and

refreshing, in response to receiving the notification, the metadata for the certain partition of the external-data-mapping table to reflect the modification.

20. The database platform of claim 19 , wherein generating the metadata comprises one or more of:

defining cumulative table metadata for the external-data-mapping table;

defining a grouping expression property for a grouping of the partitions in the external-data-mapping table;

defining an expression property for at least one of the partitions of the external-data-mapping table;

defining partition statistics for at least one of the partitions of the external-data-mapping table; and

defining a column expression property for at least one column of at least one of the partitions of the external-data-mapping table.

21. The database platform of claim 19 , further comprising storing the metadata in a partition storage object on a shared storage platform associated with the database platform, wherein the shared storage platform is separate from the external data storage platform.

22. The database platform of claim 19 , further comprising one or more of:

refreshing the metadata at threshold time periods;

refreshing the metadata in response to a threshold number of modifications being made to the content; and

refreshing the metadata in response to a request to refresh the metadata.

23. The database platform of claim 19 , wherein receiving the notification comprises one or more of:

querying the external data storage platform to determine whether any modifications have been made to the content;

receiving the notification from the external data storage platform; and

receiving the notification from a client associated with the content.

24. The database platform of claim 19 , the operations further comprising generating change tracking metadata for the certain partition, the change tracking metadata indicating how the certain content-storage location was modified and when the certain content-storage location was modified.

25. The database platform of claim 19 , the modification comprising one or more of an addition of a file, a deletion of a file, and an update to a file in the certain content-storage location.

26. The database platform of claim 19 , wherein:

the content-storage locations in the plurality of content-storage locations comprise folders and subfolders; and

the certain content-storage location comprises a certain subfolder.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 16, 2019
From: MURALIDHAR, SUBRAMANIAN; DAGEVILLE, BENOIT; CRUANES, THIERRY; SHINGTE, NILEEMA; SHAH, SAURIN; GRABS, TORSTEN; CSERI, ISTVAN
To: SNOWFLAKE INC.
Reel/Frame 048899/0061 →
Continuity (1)
Related Publication 20200334240A1 · Oct 22, 2020
Cited By (5)
US 12,235,835 US 12,248,490 US 12,265,549 US 12,405,962 US 12,517,915