Adding a column into a worksheet
Adding a column into a worksheet, including: receiving, via a spreadsheet interface comprising a first worksheet, a request to add a new column to the first worksheet, wherein the request includes a key that identifies a reference column in the first worksheet, a specification of a second worksheet that comprises a corresponding reference column related by the key, and a specification of a data column in the second worksheet, wherein each entry of the data column is associated with an entry of the corresponding reference column in the second worksheet, and entries to be included in the requested new column will be based on the entries of the data column; generating, based on the request, a database query; and receiving, from a database and in response to the database query, a query result comprising the new column to be added to the first worksheet.
1 . A method for adding a column into a worksheet, the method comprising:
receiving, via a spreadsheet interface comprising a first worksheet, a request to add a new column to the first worksheet using a key that identifies a reference column in the first worksheet and a specification of a second worksheet that comprises a corresponding reference column related by the key;
generating, based on the request, a database query; and
receiving, from a database and in response to the database query, a query result comprising the new column to be added to the first worksheet.
2 . The method of claim 1 , further comprising determining a number of entries from the reference column in the first worksheet that match entries of the corresponding reference column in the second worksheet.
3 . The method of claim 1 , wherein each entry in the new column matches a corresponding entry within the first worksheet.
4 . The method of claim 1 , wherein the database query comprises a SQL query.
5 . The method of claim 1 , wherein the spreadsheet interface is provided on a client computing system, wherein the database is hosted on a cloud-based data warehouse remote from the client computing system, and wherein the receiving of the request, the generating of the database query, and the receiving of the query result are performed by an intermediate computing system distinct from both the client computing system and the cloud-based data warehouse.
6 . The method of claim 1 , wherein the request further comprises an identification of a second key of a second reference column in the first worksheet.
7 . The method of claim 1 , wherein generating the database query further comprises generating a join operation and an aggregate identifier included in the request, wherein the aggregate identifier indicates a type of operation to be applied to the second worksheet.
8 . The method of claim 7 , wherein the type of operation indicated by the aggregate identifier consists of one of: a count operation, a subtracting operation, a sum operation, and an average operation.
9 . An apparatus for adding a column into a worksheet, the apparatus comprising a computer processor, a computer memory operatively coupled to the computer processor, the computer memory having disposed within it computer program instructions that, when executed by the computer processor, cause the apparatus to carry out the steps of:
receiving, via a spreadsheet interface comprising a first worksheet, a request to add a new column to the first worksheet using a key that identifies a reference column in the first worksheet and a specification of a second worksheet that comprises a corresponding reference column related by the key;
generating, based on the request, a database query; and
receiving, from a database and in response to the database query, a query result comprising the new column to be added to the first worksheet.
10 . The apparatus of claim 9 , wherein the steps further comprise determining a number of entries from the corresponding reference column in the second worksheet that match entries of the reference column in the first worksheet.
11 . The apparatus of claim 9 , wherein each entry in the new column matches a corresponding entry within the first worksheet.
12 . The apparatus of claim 9 , wherein the database query comprises a SQL query.
13 . The apparatus of claim 9 , wherein generating the database query includes generating a join clause.
14 . The apparatus of claim 9 , wherein the request further comprises an identification of a second key of a second reference column in the first worksheet.
15 . The apparatus of claim 9 , wherein generating the database query further comprises generating a join operation and an aggregate identifier included in the request, wherein the aggregate identifier indicates a type of operation to be applied to the second worksheet.
16 . The apparatus of claim 15 , wherein the type of operation indicated by the aggregate identifier consists of one of: a count operation, a subtracting operation, a sum operation, and an average operation.
17 . A computer program product for adding a column into a worksheet, the computer program product comprising a computer readable storage medium, the computer program product comprising computer program instructions that, when executed, cause a computer to carry out the steps of:
receiving, via a spreadsheet interface comprising a first worksheet, a request to add a new column to the first worksheet using a key that identifies a reference column in the first worksheet and a specification of a second worksheet that comprises a corresponding reference column related by the key;
generating, based on the request, a database query; and
receiving, from a database and in response to the database query, a query result comprising the new column to be added to the first worksheet.
18 . The computer program product of claim 17 , wherein the steps further comprise determining a number of entries from the corresponding reference column in the second worksheet that match entries of the reference column in the first worksheet.
19 . The computer program product of claim 17 , wherein each entry in the new column matches a corresponding entry within the first worksheet.
20 . The computer program product of claim 17 , wherein the database query comprises a SQL query.