Automatic generation of a data model from a structured query language (SQL) statement
Uloženo v:
| Název: | Automatic generation of a data model from a structured query language (SQL) statement |
|---|---|
| Patent Number: | 11934,361 |
| Datum vydání: | March 19, 2024 |
| Appl. No: | 17/811270 |
| Application Filed: | July 07, 2022 |
| Abstrakt: | A method for the automatic generation of a data model from an SQL statement includes receiving a single SQL statement in a user interface to a data analytics application, parsing the single SQL statement and extracting from the SQL statement different table references. The method also includes, for each one of the table references, directing a selection of all fields available in a corresponding table and storing the available fields in a collection of fields implicated by each table referenced by the table references. Finally, the method includes generating a data model with the fields in the collection of fields and displaying a view of the data model in a user interface of the data analytics application. |
| Inventors: | Google LLC (Mountain View, CA, US) |
| Assignees: | Google LLC (Mountain View, CA, US) |
| Claim: | 1. A computer-implemented method when executed by data processing hardware causes the data processing hardware to perform operations comprising: receiving, from a user interface of a data analytics application, a single structured query language (SQL) query; determining that the single SQL query satisfies a syntax error threshold; and in response to determining that the single SQL query satisfies the syntax error threshold: extracting, from the single SQL query, a first table reference; identifying an alias for the first table reference, the alias referencing a second table reference; obtaining, for the first table reference, fields associated with the first table reference; obtaining, for the second table reference, fields associated with the second table reference; and generating a data model using the alias, the fields obtained from the first table reference, and the fields obtained from the second table reference. |
| Claim: | 2. The computer-implemented method of claim 1 , wherein determining that the single SQL query satisfies the syntax error threshold comprises determining that the single SQL query does not include any syntax errors. |
| Claim: | 3. The computer-implemented method of claim 1 , wherein the operations further comprise displaying the data model in the user interface of the data analytics application. |
| Claim: | 4. The computer-implemented method of claim 1 , wherein the operations further comprise: extracting an expression from the single SQL query; and adding the expression to the data model. |
| Claim: | 5. The computer-implemented method of claim 1 , wherein the operations further comprise: extracting an order by directive from the single SQL query; and adding the order by directive to the data model as a sorting parameter. |
| Claim: | 6. The computer-implemented method of claim 1 , wherein obtaining fields associated with the first table reference comprises: selecting all fields of a table corresponding to the first table reference; and storing the fields selected from the table corresponding to the first table reference. |
| Claim: | 7. The computer-implemented method of claim 1 , wherein the operations further comprise identifying a different data model sharing a common element with the data model. |
| Claim: | 8. The computer-implemented method of claim 7 , wherein the operations further comprise extracting, from the different data model, a table join not included in the data model. |
| Claim: | 9. The computer-implemented method of claim 8 , wherein the operations further comprise presenting a prompt in the user interface with the extracted table join. |
| Claim: | 10. A system comprising: data processing hardware; and memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising: receiving, from a user interface of a data analytics application, a single structured query language (SQL) query; determining that the single SQL query satisfies a syntax error threshold; and in response to determining that the single SQL query satisfies the syntax error threshold: extracting, from the single SQL query, a first table reference; identifying an alias for the first table reference, the alias referencing a second table reference; obtaining, for the first table reference, fields associated with the first table reference; obtaining, for the second table reference, fields associated with the second table reference; and generating a data model using the alias, the fields obtained from the first table reference, and the fields obtained from the second table reference. |
| Claim: | 11. The system of claim 10 , wherein determining that the single SQL query satisfies the syntax error threshold comprises determining that the single SQL query does not include any syntax errors. |
| Claim: | 12. The system of claim 10 , wherein the operations further comprise displaying the data model in the user interface of the data analytics application. |
| Claim: | 13. The system of claim 10 , wherein the operations further comprise: extracting an expression from the single SQL query; and adding the expression to the data model. |
| Claim: | 14. The system of claim 10 , wherein the operations further comprise: extracting an order by directive from the single SQL query; and adding the order by directive to the data model as a sorting parameter. |
| Claim: | 15. The system of claim 10 , wherein obtaining fields associated with the first table reference comprises: selecting all fields of a table corresponding to the first table reference; and storing the fields selected from the table corresponding to the first table reference. |
| Claim: | 16. The system of claim 10 , wherein the operations further comprise identifying a different data model sharing a common element with the data model. |
| Claim: | 17. The system of claim 16 , wherein the operations further comprise extracting, from the different data model, a table join not included in the data model. |
| Claim: | 18. The system of claim 17 , wherein the operations further comprise presenting a prompt in the user interface with the extracted table join. |
| Patent References Cited: | 7822727 October 2010 Shaughnessy 9684703 June 2017 Geary et al. 20140280334 September 2014 LeBlanc 20160224594 August 2016 Chow et al. 20160255139 September 2016 Rathod 20170308606 October 2017 Jonsson et al. 20180025174 January 2018 Mathur 20180032560 February 2018 Fang et al. 20180084007 March 2018 Dinerstein 20200394201 December 2020 Li 20210056095 February 2021 Srivastava 20210073230 March 2021 Xiang 20210248143 August 2021 Khillar 20210303569 September 2021 Morganstern et al. |
| Primary Examiner: | Gortayo, Dangelino N |
| Attorney, Agent or Firm: | Honigman LLP Krueger, Brett A. |
| Přístupové číslo: | edspgr.11934361 |
| Databáze: | USPTO Patent Grants |
| Abstrakt: | A method for the automatic generation of a data model from an SQL statement includes receiving a single SQL statement in a user interface to a data analytics application, parsing the single SQL statement and extracting from the SQL statement different table references. The method also includes, for each one of the table references, directing a selection of all fields available in a corresponding table and storing the available fields in a collection of fields implicated by each table referenced by the table references. Finally, the method includes generating a data model with the fields in the collection of fields and displaying a view of the data model in a user interface of the data analytics application. |
|---|