Google Sheets API Connection This document goes over the process required to create an API connection to Google Sheets for use with idashboards. This process will include initializing the API connection, creating a Data Set from an existing Google Sheet as well as an ETL job that transfers that data into a database table/data source, and finally how to use this data to build a chart. Table of Contents Google Sheets API Connection... 1 Connecting the Google Sheets API... 2 Creating a new Data Set... 7 Creating a new ETL job... 9 Creating a new chart... 13
Connecting the Google Sheets API Begin by logging into the idashboards Data Hub and select the API Accounts option from the System drop down menu. You will now see a new screen that shows you the API Accounts options as well as any existing API connections you might have already configured. Click the Add Account button.
Now select the Google Sheets option and click Login. Log into your Google account and follow the steps below: Open a new tab and go to https://console.developers.google.com/ Select Credentials from the left hand navigation. Open the Create credentials dropdown and choose OAuth client ID.
Under Application type choose Web Application. Use the following Settings: o o Name - "idashboards Data Hub" (or other descriptive name) Authorized redirect URIs - Use the "Redirect URL" value from the Add Account dialog in the idashboards Data Hub. However, unless this URL includes a top level domain (.com,.org, etc) you will need to use localhost in place of your server/pc name.
Click Create A dialog will open with the Client ID and Client Secret copy and paste those values into the appropriate field in the Add Account dialog in the idashboards Data Hub Click Log in and choose your account in the new window.
Click Allow. You will now see the Account Created Successfully window. Close this window and go back to the Data Hub and refresh the page.
You will now see the newly created Google Sheets account availlable in the Data Hub window. Creating a new Data Set You have completed adding your Google Sheets API connection. From here you are now ready to proceed to creating a new data set in the ETL tool. First create a new Data Set: Select Cloud API and choose the Google Sheets option.
In the next window, find and select the Google sheet you would like to use, and select either the entire sheet, a named range within the sheet, or a custom range that you can define via cell range. Once you have selected the data range you want to use, you will have the option to define the data type for each column or use the detected type. Make any necessary changes and click Save.
You will now see a summary of your Data Set, along with options to add Parameters or define your column names. After you ve made any necessary changes, click Save As, give your Data Set a name, and then click Close. Your Data Set is now available in the Data Hub, but in order to make it available as a Data Source for Dashboard/Chart design, we ll need to format it with an ETL job. Creating a new ETL job From the Data Hub main page, click ETL, followed by New ETL Job at the top of the screen, or just click the NEW ETL JOB button. Once in the ETL canvas, click the E box in the upper left hand corner and drag and drop it anywhere on the canvas to start an Extract Data operation.
Hover over the Extract Data box and click the gear. This will open a window where you can select the Data Set that was created earlier. Click open and an Extract Data dialogue box will open. Click save. Now create a Load Data into Table operation by dragging and dropping the L box anywhere onto the canvas.
Then, hover over the Extract Data box, click the arrow and connect it to the Load Data into Table box. Hover over the Load Data into Table box and click the gear to configure the Load operation to save the data to a table in your database. Click Create a Target Table from Input, select your datastore, and then Select a Schema, in this case dbo.
Give the Table a name and click Create: Verify your details in the next window and click Save.
Now you can run your ETL job by clicking the play button in the upper right hand corner. Once that is done, click Save or Save As to save this ETL job for the future. Your Google Sheets data is now available as a data source that can be used to create a chart in the main idashboards user application. Creating a new chart Log into the main user application and right click on any dashboard and select New Chart. In the Data Set section find your Datastore and select it from the list, followed by the data set table you created in the ETL tool and click Next.
Now, select the columns you want to use in your chart and click Next. Choose your chart type and click Finish. You will now see your new chart filled with your Google Sheets data.