How to: |
Natural Language Query, or NLQ, lets you ask questions of your data using everyday language. This provides you with valuable insights and allows you to make informed business decisions.
NLQ translates natural language into SQL code that can be executed against a database. The natural language phrases are matched with relevant database schema columns within your data, and your query results display as a table. A maximum of 50 columns can be processed.
Examples of natural language queries include:
The NLQ engine understands the concept of time and supports different date formats. It supports one date/time column. You can refer to a date or date range in your queries, for example: sum profit for March 2013, or: sum profit for March 1 2013 to March 14 2014. The following exact date formats are supported: YYYY-MM-DD; YYYY/MM/DD; MM/DD/YYYY; MM-DD-YYYY.
Note: If NLQ becomes unresponsive, you can restart your java server to recycle the service. The recycle script uses nlp port9000, so any procedures already running on that port will be ended. The script must be re-run by the same user for it to work.
You can access NLQ from the Hub and make natural language queries against your data to gain insights.
The Explore Data dialog box opens, as shown in the following image.
The column names of your selected data source are displayed. You can choose a different data source by clicking Switch Data Source.
Relevant column names that match your phrase display as you type.
The NLQ engine can perform fuzzy matching on phrases. If you misspell a word it will recognize the correct schema column in your data. For example, a query for Dealer Cos will give a matching result for Dealer Cost.
Note: If your data contains a column titled Time, queries will fail. The column should be renamed to an alternative, such as Time1, for a query to work properly.
You can run your query results in a new window by clicking the output options button and selecting Run in new window.
Note: If your query does not result in matching data, the NLQ engine will suggest rephrasing your query, and offer examples to model your queries after.
When you use NLQ on your data, your results display as a table. You can easily save your results for future use.
The Save dialog opens, as shown in the following image.
You can title your visualization and save it to a location you choose.