IP Library Granted Patent US 12,235,835
Granted Patent B2
US 12,235,835 · App. 18/526,666 · Granted Feb 25, 2025

Systems and methods for efficiently querying external tables

Inventors: Subramanian Muralidhar (Mercer Island, WA); Benoit Dageville (San Mateo, CA); Thierry Cruanes (San Mateo, CA); Nileema Shingte (San Mateo, CA); Saurin Shah (Kirkland, WA); Torsten Grabs (San Mateo, CA); Istvan Cseri (Seattle, WA)
Assignee: Snowflake Inc.
G06F16/2423G06F3/0605G06F3/0644G06F3/0653G06F3/067G06F9/542G06F16/164G06F16/2282G06F16/2358G06F16/2393G06F16/24557G06F16/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 12,235,835
App. No.
18/526,666
Granted
Feb 25, 2025
Kind
B2
Abstract

System and method for efficiently querying external tables are described herein. In an embodiment, a database platform receives a query that is directed at least in part to external data in an external table stored on a data storage platform that is external to the database platform. The external table includes a plurality of partitions. The database platform identifies, from external-table metadata, a subset of the plurality of partitions of the external table as including data that potentially satisfies the query. The external-table metadata is stored by the database platform. The database platform identifies data that satisfies the query by scanning the identified subset of the partitions, and responds to the query at least in part with the identified data that satisfies the query.

Claims (53)

1. A method comprising:

generating a source directory by identifying a plurality of partitions, each partition including external data in an external table stored on a data storage platform, the generating of the source directory including:

identifying the plurality of partitions in the data storage platform;

identifying folders and folder locations for individual partitions; and

generating the source directory using the identified folders and folder locations;

receiving a query for execution on the external data in the external table stored on the data storage platform external to a database platform, the external data distributed among the plurality of partitions, the plurality of partitions being organized in the external table based on information located in the source directory, the source directory defining the folders and the folder locations, the folders storing files corresponding to particular partitions;

identifying at least a subset of the plurality of partitions for execution of the query;

identifying data that satisfies the query by assessing data stored within the identified subset of the plurality of partitions at least partially based on application of the query to the source directory; and

responding to the query at least in part with the identified data that satisfies the query.

2. The method of claim 1 , wherein identifying the subset comprises identifying, from external table metadata, the subset, the external table metadata being stored by the database platform.

3. The method of claim 2 , wherein the identifying of the subset comprises using the query to identify multiple instances of partition-grouping external-table metadata among the external-table metadata.

4. The method of claim 3 , wherein each instance of partition-grouping external-table metadata comprising collective metadata regarding a distinct group of partitions in the plurality of partitions.

5. The method of claim 4 , wherein the external-table metadata maps the plurality of partitions of the external table to storage locations in a source directory of the external data storage platform.

6. The method of claim 4 , further comprising generating the external-table metadata based on a hierarchical structure of the storage locations in the source directory of the external data storage platform.

7. The method of claim 4 , further comprising:

receiving, from the external data storage platform, a notification of a modification having been made in a particular storage location in the source directory of the external data storage platform; and

updating the external-table metadata to reflect the modification having been made in the particular storage location.

8. The method of claim 7 , wherein the modification comprises one or more of a file having been added to the particular storage location, a file having been modified in the particular storage location, and a file having been deleted from the particular storage location.

9. The method of claim 2 , further comprising refreshing the external-table metadata at threshold time periods.

10. The method of claim 2 , further comprising refreshing the external-table metadata in response to a threshold number of modifications being made to the external data.

11. The method of claim 2 , further comprising refreshing the external-table metadata in response to receiving a request to refresh the external-table metadata.

12. The method of claim 1 , wherein:

the database platform stores data in a first format;

the external data includes data that is stored in the external data storage platform in at least one second format that is different from the first format; and

the method further comprises converting, into the first format for storage at the database platform, the data that is stored in the at least one second format.

13. The method of claim 1 , further comprising:

generating a materialized view over the external table; and

storing the generated materialized view.

14. A database platform comprising:

at least one processor; and

one or more non-transitory computer readable storage media containing instructions that, when executed by the at least one processor, cause the database platform to perform operations comprising:

generating a source directory by identifying a plurality of partitions, each partition including external data in an external table stored on a data storage platform, the generating of the source directory including:

identifying the plurality of partitions in the data storage platform;

identifying folders and folder locations for individual partitions; and

generating the source directory using the identified folders and folder locations;

receiving a query for execution on the external data in the external table stored on the data storage platform external to a database platform, the external data distributed among the plurality of partitions, the plurality of partitions being organized in the external table based on information located in the source directory, the source directory defining the folders and the folder locations, the folders storing files corresponding to particular partitions;

identifying at least a subset of the plurality of partitions for execution of the query;

identifying data that satisfies the query by assessing data stored within the identified subset of the plurality of partitions at least partially based on application of the query to the source directory; and

responding to the query at least in part with the identified data that satisfies the query.

15. The database platform of claim 14 , wherein identifying the subset comprises identifying, from external table metadata, the subset, the external table metadata being stored by the database platform.

16. The database platform of claim 15 , wherein the identifying of the subset comprises using the query to identify multiple instances of partition-grouping external-table metadata among the external-table metadata.

17. The database platform of claim 16 , wherein each instance of partition-grouping external-table metadata comprising collective metadata regarding a distinct group of partitions in the plurality of partitions.

18. The database platform of claim 17 , wherein the external-table metadata maps the plurality of partitions of the external table to storage locations in a source directory of the external data storage platform.

19. The database platform of claim 17 , further comprising generating the external-table metadata based on a hierarchical structure of the storage locations in the source directory of the external data storage platform.

20. One or more non-transitory computer readable storage media containing instructions that, when executed by at least one hardware processor of a database platform, cause the database platform to perform operations comprising:

generating a source directory by identifying a plurality of partitions, each partition including external data in an external table stored on a data storage platform, the generating of the source directory including:

identifying the plurality of partitions in the data storage platform;

identifying folders and folder locations for individual partitions; and

generating the source directory using the identified folders and folder locations;

receiving a query for execution on the external data in the external table stored on the data storage platform external to a database platform, the external data distributed among the plurality of partitions, the plurality of partitions being organized in the external table based on information located in the source directory, the source directory defining the folders and the folder locations, the folders storing files corresponding to particular partitions;

identifying at least a subset of the plurality of partitions for execution of the query;

identifying data that satisfies the query by assessing data stored within the identified subset of the plurality of partitions at least partially based on application of the query to the source directory; and

responding to the query at least in part with the identified data that satisfies the query.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 1, 2023
From: MURALIDHAR, SUBRAMANIAN; DAGEVILLE, BENOIT; CRUANES, THIERRY; SHINGTE, NILEEMA; SHAH, SAURIN; GRABS, TORSTEN; CSERI, ISTVAN
To: SNOWFLAKE INC.
Reel/Frame 065736/0665 →
Continuity (4)
Continuation 17812878 · Jul 15, 2022
Continuation 17455798 · Nov 19, 2021
Continuation 16385837 · Apr 16, 2019
Related Publication 20240111762A1 · Apr 4, 2024
References Cited (104)
US 6088694A · Burns et al. · 2000 [cited by applicant]
US 6470333B1 · Baclawski · 2002 [cited by applicant]
US 6564215B1 · Hsiao et al. · 2003 [cited by applicant]
US 7672964B1 · Yan et al. · 2010 [cited by applicant]
US 9489434B1 · Rath · 2016 [cited by applicant]
US 9684671B1 · Dorin et al. · 2017 [cited by applicant]
US 10997165B2 · Muralidhar et al. · 2021 [cited by applicant]
US 11194795B2 · Muralidhar et al. · 2021 [cited by applicant]
US 11269868B2 · Muralidhar et al. · 2022 [cited by applicant]
US 11354316B2 · Muralidhar et al. · 2022 [cited by applicant]
US 11397729B2 · Muralidhar et al. · 2022 [cited by applicant]
US 11841849B2 · Muralidhar et al. · 2023 [cited by applicant]
US 20030069902A1 · Narang et al. · 2003 [cited by applicant]
US 20040177319A1 · Horn · 2004 [cited by applicant]
US 20050235001A1 · Peleg · 2005 [cited by applicant]
US 20050256897A1 · Sinha et al. · 2005 [cited by applicant]
US 20060059171A1 · Borthakur et al. · 2006 [cited by applicant]
US 20060085465A1 · Nori et al. · 2006 [cited by applicant]
US 20080183777A1 · Xi et al. · 2008 [cited by applicant]
US 20080294703A1 · Craft · 2008 [cited by examiner]
US 20090144338A1 · Feng et al. · 2009 [cited by applicant]
US 20100036799A1 · Bouloy et al. · 2010 [cited by applicant]
US 20100036800A1 · Gui et al. · 2010 [cited by applicant]
US 20100036886A1 · Bouloy et al. · 2010 [cited by applicant]
US 20100325170A1 · Bloesch et al. · 2010 [cited by applicant]
US 20120066205A1 · Chappell et al. · 2012 [cited by applicant]
US 20130007069A1 · Chaliparambil et al. · 2013 [cited by applicant]
US 20130097217A1 · Flanagan · 2013 [cited by applicant]
US 20140040310A1 · Hanckel et al. · 2014 [cited by applicant]
US 20140181013A1 · Micucci et al. · 2014 [cited by applicant]
US 20140201228A1 · Long · 2014 [cited by applicant]
US 20140317084A1 · Chaudhry et al. · 2014 [cited by applicant]
US 20150199407A1 · Ziauddin et al. · 2015 [cited by applicant]
US 20160063021A1 · Morgan · 2016 [cited by examiner]
US 20160154866A1 · Teletia · 2016 [cited by applicant]
US 20160335176A1 · Cantrell, Jr. et al. · 2016 [cited by applicant]
US 20160337366A1 · Wright · 2016 [cited by examiner]
US 20170220605A1 · Nivala et al. · 2017 [cited by applicant]
US 20170249246A1 · Bryant et al. · 2017 [cited by applicant]
US 20180011905A1 · Liu et al. · 2018 [cited by applicant]
US 20180018343A1 · Zukowski et al. · 2018 [cited by applicant]
US 20180095963A1 · Verma et al. · 2018 [cited by applicant]
US 20180121440A1 · Maquaire et al. · 2018 [cited by applicant]
US 20180157752A1 · Arikatla et al. · 2018 [cited by applicant]
US 20180267518A1 · Hassman · 2018 [cited by applicant]
US 20180285406A1 · Shah et al. · 2018 [cited by applicant]
US 20190102412A1 · Macnicol et al. · 2019 [cited by applicant]
US 20190147086A1 · Pal et al. · 2019 [cited by applicant]
US 20190179941A1 · Williams et al. · 2019 [cited by applicant]
US 20190188091A1 · Christiansen et al. · 2019 [cited by applicant]
US 20190332698A1 · Cho et al. · 2019 [cited by applicant]
US 20200004449A1 · Rath et al. · 2020 [cited by applicant]
US 20200097575A1 · Mathur · 2020 [cited by applicant]
US 20200125265A1 · Schneider et al. · 2020 [cited by applicant]
US 20200125666A1 · Eadon et al. · 2020 [cited by applicant]
US 20200233721A1 · Mathur · 2020 [cited by applicant]
US 20200334240A1 · Muralidhar et al. · 2020 [cited by applicant]
US 20200334242A1 · Muralidhar et al. · 2020 [cited by applicant]
US 20210216541A1 · Muralidhar et al. · 2021 [cited by applicant]
US 20220075776A1 · Muralidhar et al. · 2022 [cited by applicant]
US 20220114180A1 · Muralidhar et al. · 2022 [cited by applicant]
US 20220350795A1 · Muralidhar et al. · 2022 [cited by applicant]
CN 105283872 · 2016 [cited by applicant]
CN 106233253 · 2016 [cited by applicant]
CN 107004016 · 2017 [cited by applicant]
CN 112567357 · 2021 [cited by applicant]
WO 2020214671 · 2020 [cited by applicant]
“U.S. Appl. No. 16/385,837, Preliminary Amendment filed Apr. 8, 2020”, 14 pgs. [cited by applicant]
“U.S. Appl. No. 16/842,942, Non Final Office Action mailed Jun. 8, 2020”, 8 pgs. [cited by applicant]
“International Application Serial No. PCT US2020 028267, International Search Report mailed Jul. 1, 2020”, 2 pgs. [cited by applicant]
“International Application Serial No. PCT US2020 028267, Written Opinion mailed Jul. 1, 2020”, 4 pgs. [cited by applicant]
“U.S. Appl. No. 16/842,942, Response filed Sep. 8, 2020 to Non Final Office Action mailed Jun. 8, 2020”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 16/842,942, Examiner Interview Summary mailed Sep. 11, 2020”, 3 pgs. [cited by applicant]
“U.S. Appl. No. 16/842,942, Final Office Action mailed Oct. 19, 2020”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 16/842,942, Response filed Dec. 21, 2020 to Final Office Action mailed Oct. 19, 2020”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 16/842,942, Notice of Allowance mailed Jan. 12, 2021”, 7 pgs. [cited by applicant]
“U.S. Appl. No. 16/385,837, Non Final Office Action mailed Apr. 21, 2021”, 26 pgs. [cited by applicant]
“U.S. Appl. No. 17/219,854, Non Final Office Action mailed Jun. 17, 2021”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 16/385,837, Examiner Interview Summary mailed Jul. 20, 2021”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 16/385,837, Response filed Jul. 21, 2021 to Non Final Office Action mailed Apr. 21, 2021”, 16 pgs. [cited by applicant]
“U.S. Appl. No. 17/219,854, Response filed Sep. 17, 2021 to Non Final Office Action mailed Jun. 17, 2021”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 17/219,854, Notice of Allowance mailed Oct. 13, 2021”, 7 pgs. [cited by applicant]
“U.S. Appl. No. 16/385,837, Notice of Allowance mailed Oct. 20, 2021”, 11 pgs. [cited by applicant]
“International Application Serial No. PCT US2020 028267, International Preliminary Report on Patentability mailed Oct. 28, 2021”, 6 pgs. [cited by applicant]
“U.S. Appl. No. 17/219,854, Notice of Allowance mailed Nov. 4, 2021”, 7 pgs. [cited by applicant]
“U.S. Appl. No. 16/385,837, Corrected Notice of Allowability mailed Nov. 10, 2021”, 6 pgs. [cited by applicant]
“U.S. Appl. No. 17/219,854, Corrected Notice of Allowability mailed Nov. 23, 2021”, 2 pgs. [cited by applicant]
“Indian Application Serial No. 202047055625, First Examination Report mailed Jan. 11, 2022”, with English translation, 7 pages. [cited by applicant]
“U.S. Appl. No. 17/455,798, Notice of Allowance mailed Feb. 23, 2022”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/561,222, Notice of Allowance mailed Mar. 3, 2022”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/455,798, Notice of Allowance mailed Apr. 18, 2022”, 8 pgs. [cited by applicant]
“U.S. Appl. No. 17/561,222, Corrected Notice of Allowability mailed May 4, 2022”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 17/812,878, Non Final Office Action mailed Sep. 9, 2022”, 19 pgs. [cited by applicant]
“Indian Application Serial No. 202047055625, Response filed Oct. 11, 2022 to First Examination Report mailed Jan. 11, 2022”, with English translation, 73 pages. [cited by applicant]
“U.S. Appl. No. 17/812,878, Response filed Dec. 8, 2022 to Non Final Office Action mailed Sep. 9, 2022”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 17/812,878, Final Office Action mailed Jan. 5, 2023”, 19 pgs. [cited by applicant]
“U.S. Appl. No. 17/812,878, Response filed Apr. 5, 2023 to Final Office Action mailed Jan. 5, 2023”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 17/812,878, Non Final Office Action mailed Apr. 21, 2023”, 19 pgs. [cited by applicant]
“U.S. Appl. No. 17/812,878, Response filed Jul. 18, 2023 to Non Final Office Action mailed Apr. 21, 2023”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 17/812,878, Examiner Interview Summary mailed Jul. 21, 2023”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 17/812,878, Notice of Allowance mailed Aug. 4, 2023”, 9 pgs. [cited by applicant]
“Chinese Application Serial No. 202080004507.8, Office Action mailed Feb. 7, 2024”, with English translation, 17 pages. [cited by applicant]
“Chinese Application Serial No. 202080004507.8, Response filed Jun. 5, 2024 to Office Action mailed Feb. 7, 2024”, with English claims, 28 pages. [cited by applicant]
Gubar, Martin, “Using Materialized Views with Big Data SQL to Accelerate Performance”, The Data Warehouse Insider, Retrieved from the Internet: URL: https: blogs.oracle.com datawarehniiKing using-materialized views-with… [cited by applicant]
Cited By (1)
US 12,699,789