How to Use the SQL Connector
Power My Analytics now offers an SQL connector in addition to our Hosted SQL solution. This article will help you get started with using our SQL connector and set up a MSSQL or MYSQL query.
Connect to your server in the Hub
Select Source in the left navigation pane, then click +New Data Source. Find SQL in the gallery.
Choose MYSQL or MSSQL then enter your credentials to verify.
Create a query
The connector configuration screen for SQL requires you to enter a query manually.
Format your query according to your database's rules.
A successful query may look like this:
| 1 | | 2 | | 3 | | 4 | 5 |
SELECT | * | FROM | table | WHERE DATE BETWEEN | $start$ | AND | $end$ | limit 100 |
- Use * if you want to retrieve all data from your table. Otherwise, enter the specific terms you wish to select for and make sure the spelling is exactly the same.
- Enter the name of the table here and make sure the spelling is exactly the same. Use underline characters (_) instead of spaces.
- Date should be formatted according to your database's rules or you can use $start$ to specify your start date within the report.
- Date should be formatted according to your database's rules or you can use $end$ to specify your end date within the report.
- Set a limit on the number of rows you wish to retrieve. Larger limits will take longer to retrieve. Looker Studio has a limit of 1,000,000. If you do not set a limit and you retrieve more than 1,000,000, you will receive an error.
Click Connect to create your report. If you entered $start$ and $end$ instead of dates, you may specify your range with a date range control in Data Studio.
Still having issues?
Send us a ticket and we will get back to you.
Related Articles
Quickbooks Data Connector User Guide
The following article is a guide for automating reports with your Quickbooks connector. It includes metrics available and things to know about the connector. To create a report, you will need access to at least one or more Quickbooks online accounts ...
Shopify Data Connector User Guide
The following article is a guide for automating reports with your Shopify connector. It includes metrics available and how to connect, and backfill your Shopify data. To create a Shopify report, you will need access to at least one or more Shopify ...
Twitter Ads Data Connector User Guide
The following article is a guide to automating reports with your Twitter Ads connector. It includes information on available data as well as tips on how to get the most out of your Twitter Ads reports. To begin creating reports with your Twitter Ads ...
Amazon Ads Data Connector User Guide
The following article is a guide for automating reports with your Amazon Ads connector. It includes metrics available and how to connect, backfill, and blend your Amazon data. To create an Amazon report, you will need access to at least one or more ...
Mailchimp Data Connector User Guide
The following article is a guide to automating reports with your Mailchimp connector. It includes information on available data as well as currently unavailable data and tips on how to get the most out of your Mailchimp reports. To begin creating ...