![]() ![]() Use Stored Procedure (Mostly useful to parameterize calls.Query View which contains OPENQUERY to Linked Server for REST API data.Once connection is created for SQL Server we can read REST API data 3 different ways: To create new Connection click More > Microsoft SQL Server > Enter your credentials to connect to SQL Server (in our example before we used tdsuser): Open Tableau Desktop and click File > New.Let's begin and see how to accomplish that: ![]() SELECT * FROM OPENQUERY(, 'SELECT * FROM Invoices')Īctually, we will be getting data from SQL Server which in turn will be getting data from ZappySys Data Gateway data source. We will create a view to return invoices: SELECT * FROM OPENQUERY(, 'SELECT * FROM Products') įinally, use this or similar query in a view or stored procedure, which you will be able to use in Tableau. Then click on Security option and configure username we created in ZappySys Data Gateway in one of the previous steps:įinally, open a new query and execute a query we saved in one of the previous steps: Go to SQL Server Management Studio and configure it in a similar way: To read the data in SQL Server the first thing you have to do is create a Linked Server. Read data in SQL Server from the ZappySys Data Gateway data source Select the Preview tab and use settings similar to the following to preview data:Ĭlick OK to finish creating the data source. Once the data source has been configured, you can preview data. Juse share with Service Account (use Service Account Email found on previous section) Here is how to share file(s) with specific people. Click on the Share button in the top right, and add the email address of the service account as an editor.Navigate to Google Docs File for which you like to give read/write access to Service Account.Copy the email address of your service account we created in previous step (its usually like this Create or select an existing Google Docs File.Basically you can create or open Google Sheet and add the Service Account as an editor to it as below. Now last thing is give read/write permission to Service Account. Now you may use downloaded *.p12 key file as secret file and Service Account Email as Client ID (e.g.We will use this file in our API connection. A P12 key file is downloaded to your computer. Click Add key, then click Create new key.In the Cloud Console, click the email address for the service account that you created.Once service account is created we need to create key file (i.e. For Role, do not select anything for now and Click Continue and then click Done.Enter Service account name and Service account description.Service account has its ID which looks like some email ID (not to confuse with Google /Gmail email ID) Once Project is created and APIs are enabled we can now create a service account under that project. Now we need to Enable two APIs one by one (Drive API).Skip this section if you already have Project (Go to next section) Learn more about service account hereīasically to call Google API as Service account we need to perform following steps listed in 3 sections (Detailed steps found in the help link at the end)įirst thing is create a Project so we can call Google API. Use these steps to authenticate as service account rather than Google / GSuite User. You can use this information now to configure Connection with UseCustomApp=true.įill in all required parameters and set optional parameters if needed: When prompted Select Application Type as Desktop App and click Create to receive your ClientID and Secret.Click CREATE CREDENTIALS (some where in topbar) and select OAuth Client ID option.Go to back to main screen of Google API Console. ![]()
0 Comments
Leave a Reply. |