List of common solutions to help with data source connections.
This the multi-page printable view of this section. Click here to print.
Troubleshooting
1 - Connnecting to AWS RDS
Zing Data can connect to any AWS RDS database, but there are a few steps to go through to allow Zing’s platform to access.
Steps
- Go to your AWS console
- Go to RDS and select the database you want to view on Zing Data.
- Then look for the security group shown below
- Confirm that the instance is
Publically Accessible
-
Now hit the edit button for the inbound rules for the security group.
-
Add a single rule for the database type and port that it is running on. The screenshot shows two inbound rules that have been added for mySQL on standard port 3306 and one for Postgres on standard port 5432. The IP address for Zing Data’s platform is
34.75.82.6
-
That’s it. You’re done!
2 - Natural Language Queries
There are three primary methods to more precisely control Natural Language responses in Zing:
- Examples: Define specific examples to clarify ambiguous terms and calculations.
- Regular
- Analysis Question
- Run question as custom SQL if exact match
- Aliases: Create human-readable labels for databases, fields, and calculations to improve query interpretation.
- Exact Responses: Specify exact SQL queries for complex or highly specific questions.
1.1 Example: Regular
Even the best AI needs a little bit of help from time to time to understand your data and questions better. With Zing, you can clarify ambiguous terms and calculations quickly by adding a few training examples to your data source.
Ambiguous terms are words or phrases that have multiple meanings or interpretations, which can lead to confusion or inaccuracies in the AI’s response. For example, the word “bark” can refer to the sound a dog makes or the outer covering of a tree, and without context, an AI might not understand which meaning is intended.
Similarly, ambiguous calculations are those where the operations or variables are not clearly defined or could be interpreted in multiple ways. For example, if someone asks an AI to “calculate the increase,” without specifying what to increase, by how much, or over what time period, the AI would not be able to provide a correct answer.
Example Question and how to fine tune the response
Q: How many trips are long by plan type?
Task: We want to define “long” as being greater than 10 minutes
Step 1: Go to Zing Console and select a data source
- Web console: https://console.getzingdata.com/
- Select your data source you want to train AI on
- Go to the Examples tab and enter your questions and corresponding SQL.
Step 2: Go to Zing App
Ask “How many trips are long by plan type?” and see how AI is now showing a visualization with a filter automatically applied with trips that are longer than 10 minutes!
2. Aliases
Creating human-readable labels ensures your analysis is easily understood by others.
With Zing, you can alias databases, fields, and calculations, enhancing clarity and interpretability across all queries.
To Create a Database Alias:
- Go to the data source ’edit’ screen in the Zing Data web console.
- Specify a display name; this will be shown within the Zing app.
- If left blank, the original database name will be used.
To Create a Field Alias:
- Go to the data source settings in the Zing web console.
- Select ‘alias’ and then ‘add/edit.’
- Choose the fields to alias and save.
These aliases help the AI translate natural language questions into accurate query results.
To Create a Calculation Alias:
- Go to the data source settings and navigate to the Examples tab.
- Create a new example by specifying the question text and corresponding SQL.
For example, defining “utilization” as select sum(hours_worked)/sum(hours_available) as utilization from mytable allows you to use “utilization” in natural language queries effectively.
3. Creating Exact Responses
Sometimes a question requires SQL complexity beyond what SwiftQuery can handle. In these cases, you can define an exact response that the AI will use.
How It Works:
- When a user asks a question that matches an exact response, the AI will run the specified SQL directly.
- Exact responses can include complex SQL, including CTEs and subqueries.
Please Note:
-
Define a question in the Examples tab with the corresponding SQL.
-
If a user’s query is an exact match, the system executes the SQL; otherwise, it maps to SwiftQuery.
In Addition: Helper Text
You can also create ghost text to guide a user. Ghost text provides a prompt within the input field, offering suggestions on what users might want to ask. This helps users frame their questions more effectively, ensuring they get the most relevant responses.
How It Works
- Click on ‘Data Sources’
- Click on ‘Settings’ of your chosen data source
- Use the Aliases, Examples, or Helper Text functions
3 - Connnecting to Google Cloud SQL
Zing Data can connect to any Google Cloud SQL database, but there are a few simple steps to enable access for the Zing Data platform.
Steps
-
Go to your GCP console here
-
Select
SQL
from the sidebar shown here -
Select
Connections
from the sidebar for the mySQL, postgres or SQL Server Cloud SQL instance you want to connect to Zing Data. -
Now hit the
Networking
tab to be able to manage the ip allow lists for your instance. -
Here you can add Zing Data’s IP as an allow list =
34.75.82.6
-
After you’ve saved this configuration, you can now add your CloudSQL instance as a datasource in the Zing Console (instructions here)
-
That’s it. You’ve now successfully configured a Google CloudSQL instance with Zing Data. Happy Querying!