How to Use the SQL Connector

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 Sources in the left navigation pane, then click + New Data Source. Click on SQL in the gallery.



Choose MySQL or MSSQL, then enter your Host, Port, Username, Password, and a Name for this server.



Make sure your SQL server is configured to allow connections from PMA's IP address, 35.188.118.242.


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:

12345
SELECT
*
FROM
table
WHERE DATE BETWEEN
$start$
AND
$end$
limit 100

  1. 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.
  2. Enter the name of the table here and make sure the spelling is exactly the same. Use underline characters (_) instead of spaces.
  3. Date should be formatted according to your database's rules or you can use $start$ to specify your start date within the report.
  4. Date should be formatted according to your database's rules or you can use $end$ to specify your end date within the report.
  5. 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 by adding a date range control in Data Studio.




    Still having issues?
    Send us a ticket and we will get back to you.
      • Related Articles

      • Taboola Data Connector User Guide

        The following article is a guide to automating reports with your Taboola connector. It includes information on available data as well as currently unavailable data and tips on how to get the most out of your Taboola reports. To begin creating reports ...
      • 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 ...