US 12,259,889 B2
Query generation based on a logical data model with one-to-one joins
Naman Shah, Palo Alto, CA (US); Rakesh Kothari, San Jose, CA (US); and Vaibhav Agarwal, Cupertino, CA (US)
Assigned to Thoughtspot, Inc., Mountain View, CA (US)
Filed by ThoughtSpot, Inc., Mountain View, CA (US)
Filed on Mar. 8, 2024, as Appl. No. 18/599,389.
Application 18/599,389 is a continuation of application No. 16/854,219, filed on Apr. 21, 2020, granted, now 11,928,114.
Claims priority of provisional application 62/837,426, filed on Apr. 23, 2019.
Prior Publication US 2024/0211479 A1, Jun. 27, 2024
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 15/16 (2006.01); G06F 16/21 (2019.01); G06F 16/22 (2019.01); G06F 16/2453 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 16/2456 (2019.01) [G06F 16/211 (2019.01); G06F 16/2246 (2019.01); G06F 16/2282 (2019.01); G06F 16/24534 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
obtaining, by a data analysis system, a database query for obtaining results data, wherein the database query is expressed in accordance with a defined structured data access language implemented by a database, wherein obtaining the database query includes:
automatically generating, by the data analysis system, the database query in accordance with a transformed database agnostic representation of the database query; and
prior to automatically generating the database query, automatically generating, by the data analysis system, the transformed database agnostic representation of the database query by:
obtaining, by the data analysis system, user input data, wherein the results data is responsive to the user input data;
prior to obtaining the user input data, obtaining, by the data analysis system, a join graph, wherein the join graph indicates a first join between a first table stored in the database and a second table stored in the database, wherein relationship data indicating that the first join is a one-to-one join is unavailable from the join graph;
automatically generating, by the data analysis system, in response to the user input data, a database agnostic representation of the database query; and
transforming, by the data analysis system, the database agnostic representation to obtain the transformed database agnostic representation, wherein transforming the database agnostic representation includes:
obtaining, by the data analysis system, from the join graph, a connected subgraph, wherein the connected subgraph includes a first vertex representing the first table, a second vertex representing the second table, and a first unidirectional edge extending from the first vertex to the second vertex representing the first join;
accessing, by the data analysis system, the relationship data;
in response to the relationship data, obtaining, by the data analysis system, a modified subgraph by modifying the connected subgraph, wherein the modified subgraph includes the first vertex representing the first table, the second vertex representing the second table, and a second unidirectional edge extending from the second vertex to the first vertex, and wherein the modified subgraph omits the first unidirectional edge; and
automatically generating, by the data analysis system, in response to the modified subgraph, a query graph including a root vertex corresponding to the database query;
obtaining, by the data analysis system, from the database, the results data, responsive to execution of the database query by the database; and
outputting, by the data analysis system, at least a portion of the results data for presentation to a user.