This article will walk the reader through how to use Ask ClearQuery
Ask ClearQuery was designed to allow all users (of any technical skill level) the ability to “ask” their dataset questions. As opposed to the “old school” method of reaching out to the data science team and requesting a data pull which might not meet the need, with a response rate that may be less than ideal.
As with other features, ClearQuery analyzes the data upon ingest and formulates potential sample questions for that dataset. The system is not limited to those sample questions. The user can ask whatever comes to mind based on the contents of the dataset. However, if the data does not support the question, then the system cannot provide a response. If you receive no data back or a message that says, “There is no data to return a visualization” or “ClearQuery failed to understand your question”, try rephrasing the question or review the contents of the dataset to see if the data you are seeking is present or possibly in a different dataset.
To start using Ask ClearQuery, click on the “?” in the navigation:
The Ask ClearQuery feature is centered around the question input box. This is where the user inputs questions, and ClearQuery converts them into queries, resulting in a graphical representation of the data results.
To view the underlying query, the user can click on the information icon (ℹ️) in the top right corner of the chart. Additionally, as with other features, the user can save and change the chart type by using the buttons in the top right corner of the chart window.
As the user continues to drill into their dataset with questions, the user can apply additional filters or manually click into the charts to further explore the data. To remove filters, click on the “x” within the associated filters listed in the middle of the screen above the question bar.
To assist users, as they begin to type a question, Ask ClearQuery provides suggestions to complete the question. It even lets the user “Tab to complete,” which means the user can press the “tab” key on their keyboard and Ask CQ will provide options of the various fields the user can include in their question - as seen below:
Note: when searching for a specific value within a category field, place the value in quotes to ensure the provided results are specific to the requested item.
As you get used to how Ask ClearQuery works you will notice that specific question prompts lead to specific response / result types, for instance:
- If the user starts a question with
- “How many…”, ClearQuery will provide a number-based result.
- “Show me…”, ClearQuery will provide a graphical result.
- “Show me the Top 20…”, ClearQuery will provide a chart showing more than the standard 10 results.
**Additional sample questions are listed at the bottom of this article, this is not an exhaustive list, there are many ways to structure your questions or prompts.
After the user has asked a question, a dropdown called “Next Steps” will appear under the question input field. The dropdown allows the user to:
- Find Alternative Datasets: Here ClearQuery will show the user all the other datasets that provided results for their question. The user can select one of the other datasets and the system will update AskCQ to show those results.
- “What are Others Asking”: this shows the user a list of other questions users in their organization have asked the dataset.
Remember, once the user has narrowed down their search and found the view they are looking for, the user can save that chart and add it to a Dashboard, Insights Canvas, or their customizable Home page for quick reference moving forward. For more information on this process, see the “Dashboards” article.
Configuring AskCQ: Dataset owners can assign synonyms to each field within the dataset, allowing users to ask questions using more naturally worded questions. For example:
-
- An AskCQ question without synonyms: “Show me the top 10 ordering_customer_name with original_ordered_amount greater than 25000.”
- An AskCQ question with synonyms: “Show me the top senders of transactions with amounts greater than 25000.”
By adding the synonyms, users are not required to know the specific field names within the dataset. To learn more about adding synonyms to datasets, see the "Editing Datasets" article.
Sample AskCQ question types:
Note: these are just a few examples and is not
an exhaustive list of question structures.
Aggregation (count by field values): | Aggregate records by {FIELD} in (descending / ascending) order |
Show me the (top / bottom) (number 5, 10, 25...) {FIELD} | |
Which {FIELD} has the most records [Search Clause]* |
*Example Search Clauses listed below
Cardinality (# of unique values): | How many unique {FIELD} exist |
What is the total number of {FIELD} |
Stats Aggregation (statistics of a provided field): | What is the (max, min, ave, sum total) {# FIELD}* |
Show the (max, min, ave, sum total) {# FIELD}* |
* # Field is a numeric field type
Date Histogram Aggregation (trend analysis for a given date range or frequency): | Break down records by (date interval: ...hour, day, month…) |
Show me the number of record per (date interval: ...hour, day, month…) | |
Show me the number of records over time |
Search (find records with specific values): |
Show me records [Search Clause] |
What are the records [Search Clause] | |
Find all records [Search Clause] |
Search Clauses: |
|
String Examples: | where {FIELD} is equal to "value"* |
that have "value" in the {FIELD} | |
with a "value" in the {FIELD} | |
Numeric Examples: | where the {FIELD} is between (value1) and (value2) |
where the {FIELD} is (value) | |
that have {FIELD} (less than, equal to, more than) (value) |
*Values need to be an identical match to what is in the field, place the value in quotation marks. (partial searches will not return results)
Count: | How many records [Search Clause] are there? |
What is the number of records [Search Clause] | |
How many times was [Search Clause] |
Refine (ask a follow-on ?):* | Narrow down to records [Search Clause] |
Only show the records [Search Clause] |
*AskCQ allows for follow-up questions.
Search Text Fields:* | show me all records that mention "value" |
*Value can be a partial match when searching text fields.
Begin New Question: | Start Over |
Clear | |
Reset |
Examples of Advanced question structure: | Show me the leading {FIELD} where {# FIELD} is (less than, equal to, more than) (value) |
Aggregate {FIELD} by {FIELD} and the {# FIELD} is (less than, equal to, more than) (value) |
If you have additional questions regarding this topic, please reach out to your Account Manager or contact ClearQuery Support (support@clearquery.io).