Get Better Answers from DataTalk: How to Use Hints Effectively
Prefer to watch instead? Check out the video below:
Troubleshooting DataTalk: Why You Get No Results (and How to Fix It)
Have you ever asked DataTalk a question and received no results, or answers that just didn’t make sense?
You’re not alone! Sometimes, DataTalk needs a little help to understand exactly what you’re looking for—and that’s where hints come in.
In this post, we’ll walk through a real example, show you why things can go wrong, and give you a simple way to get better results from DataTalk.
DataTalk is a powerful AppGini plugin that transforms how you access and analyze your database—while keeping your data private and secure on your own server. Instead of writing complex SQL queries, you simply ask questions in plain English or your native language, and DataTalk instantly delivers accurate answers.
The Scenario: Finding the Top Shipping Company
Let’s say you’re using the Northwind demo application, which manages customer orders and deliveries.
You want to know: Which shipping company handles the most shipments in the United States?
You type your question into DataTalk and hit “Get Answer”. But instead of a helpful response, you get a message saying no results were found.
What Went Wrong?
DataTalk shows you the SQL query it tried to run. Here’s what it looked like:
|
|
At first glance, this seems fine. But there’s a hidden catch:
The field orders.ShipCountry
isn’t where the country information actually lives!
Understanding the Database Structure (Without Getting Too Technical!)
In the Northwind database, the “ship country” you see in the orders table isn’t a regular field.
Instead, it’s a lookup field—meaning, it actually points to the customer’s country stored in the customers table.
So, when DataTalk tries to filter by orders.ShipCountry
, it can’t find the right information.
Providing a Helpful Hint
Luckily, you don’t need to be an SQL expert to fix this.
You can simply add a hint to your question, such as:
Hint: don’t use orders.ship country but obtain the customer’s country instead.
DataTalk is smart enough to understand this and adjust the query accordingly.
The Correct Query
After adding the hint, DataTalk generates a much better SQL query:
|
|
Now, DataTalk looks up the customer’s country from the right place, joins the necessary tables together, and gives you the correct answer!
Key Takeaways
- If you get no results or answers that don’t make sense, check the SQL query DataTalk shows you.
- Look for fields or tables that might not match what you want.
- Add a clear hint to your question, like “use the customer’s country instead of the order’s ship country.”
- You don’t need to know SQL—just explain your intent in plain language!
DataTalk is a powerful assistant, but sometimes it needs a little extra guidance.
By giving it clear hints, you can get the accurate answers you’re looking for.