Posts

Showing posts with the label Stored Procedure

Build Google BigQuery "Stored Procedures" With Google Cloud SQL - Part 2

______________________ Part one  described the Google Cloud SQL database the sample application uses for the BigQuery "stored procedure" technique. Part two here  will briefly describe important details about the BigQuery project behind the solution. Part three  has an overview of the Google Apps Script solution engineering. Part four  will explain the JavaScript objects behind the Google Apps Script solution. Download the five Google Apps Script component files and scripts for the MySQL stored procedure and the MySQL user-defined function from the  GitHub repository . ________________ T he solution described in this specific article will use the BigQuery project described in this earlier article . For the solution here, name the BigQuery project      BigQuerySPDemoAppDS and create one table called      zbp11totals in it. Load it with data from  zip file " Complete ZIP Code Tota...

Build Google BigQuery "Stored Procedures" With Google Cloud SQL - Part 1

______________________ To analyze large data volumes, Google BigQuery  is a great tool. Through  Google Apps Scripts , we can easily build universal web applications  to front-end BigQuery. The JavaScript engineering behind these web applications certainly works well enough, but a major pain point remains: BigQuery does not handle stored procedures . This article describes a sample Google Apps Script solution that front-ends both BigQuery and Cloud SQL, using Cloud SQL to simulate BigQuery stored procedures. In this approach, a JavaScript function takes a Cloud SQL / MySQL stored procedure name and an array of stored procedure arguments as parameters. The function returns a BigQuery result set in a JavaScript array. Of course, when / if Google provides a BigQuery stored procedure feature, it will have a completely different user / developer experience and completely different engineering. However, this new approach works really well and it makes BigQuery front...

Build Google BigQuery "Stored Procedures" With Google Cloud SQL - Part 3

______________________ Part one  described the Google Cloud SQL database the sample application uses for the BigQuery "stored procedure" technique. Part two described important details about the BigQuery project behind the solution. Part three here has an overview of the Google Apps Script solution engineering. Part four will explain the JavaScript objects behind the Google Apps Script solution. Download the five Google Apps Script component files and scripts for the MySQL stored procedure and the MySQL user-defined function from the  GitHub repository . ________________ T he engineering for this solution closely matches the engineering described in the earlier article . Therefore, we'll focus on the differences between the solutions and the innovations in this solution. Each solution must build a BigQuery query string based on web form user picks, send that query string to a BigQuery project, receive the result set, and write the result ...

Build Google BigQuery "Stored Procedures" With Google Cloud SQL - Part 4

Image
______________________ Part one  described the Google Cloud SQL database the sample application uses for the BigQuery "stored procedure" technique. Part two   described important details about the BigQuery project behind the solution. Part three  gave an overview of the Google Apps Script solution engineering. Part four here will explain the JavaScript objects behind the Google Apps Script solution. Download the five Google Apps Script component files and scripts for the MySQL stored procedure and the MySQL user-defined function from the  GitHub repository . ________________ T his diagram 1. Solution file / object diagram shows how the component solution files and objects fit together. At line 177 of the Code.gs file,  the runQuery() function 2. The runQuery() function declares and initializes a getSPStringObject class 3. The getSPStringObject class object. The object ultimately returns a finished BigQuery query string...