The Production setup for the Microsoft Power BI connector is intended as the middle ground between the Scale and the Development setup. While the Scale setup is the best when it comes to scaling with data, the Production scales sufficiently well for clients that do not have large amounts of traffic.
This setup is a good fit for clients who:
These instructions assume you have a Power BI Premium or Pro license and a published solution. Alternatively, you can publish and use the prebuilt Longberry Baristas solution and queries included in your free trial environment. The published bot should also have been in use in order to generate some interesting log data.
The solution contains a .mez file that enables Power BI to connect to Teneo Inquire and execute shared queries. Shared queries can be created and saved in Studio at any time to allow a team of developers to quickly extract the information they need from a project's log data. When using the Power BI connector, this makes it easy to access the data needed for whatever Power BI visualizations the team is using. More information on how to create and save these queries can be found here.
This folder is not always created by Power BI Desktop. If it is not, it will need to be created manually.
By default, Microsoft Power BI will not allow access for third party extensions unless they are manually enabled. To use our connector, we will need access.
Adjust the data extension security settings as follows:
The Power BI Saved Queries Connector supports converting the data types between Teneo Inquire and Power BI by utilizing type prefixes. This can be done in Teneo with the 'as' notation, demonstrated here, and variable prefixes. The following table contains examples of how to use variable prefixes:
|d||d:Date||This prefix denotes a date, without the addition of time. If not stored as a date variable, Power BI will treat this value as text (string), and will not be able to compare different dates.|
|dt||dt:DateTime||This prefix denotes a date together with time. If not stored as a date and time variable, Power BI will treat this value as text (string), and will not be able to compare different dates.|
|f||f:Float||This is the prefix for a float number.|
|l||l:Logical||This prefix is used for logical values, e.g. a boolean.|
|n||n:Integer||This prefix is used for whole numbers without any decimals.|
|s||s:String||This is the prefix for a string.|
|t||t:Time||This is the prefix for a time, without the addition of date.|
The prefixes uses the same format done inside Teneo Inquire, a full list of variable prefixes in Inquire can be seen here.
The solution needs to have published shared queries. There are a few things to you need to do in order to be able to retrieve these in Power BI:
Do not forget to add a descriptions to your query when you save them. This is crucial for Power BI to recognizing it.
Once your queries have been written and published, they are ready to be used to access the data you need in Power BI. In order to access that data inside Power BI, you will first need to ask Teneo Inquire to save the query results. We have two alternative approaches for how to achieve this.
Teneo Inquire supports two ways of saving and exporting query results data: the first is from the Teneo Studio frontend and the second uses the save TQL command. Save stores query results using name as the data results identifier. When results have been saved, the source command can retrieve those results using the parameter name and use them as the source data for another query.
save (name="NAME")to save the query, and
source (name="NAME")to load the saved results.
If we use the following query as an example,
sample 1000 la t.e.userInput as 's:UserInput' : t.e.userInput ~= ".(\w.+\s).+", then the query can be saved as follows:
save (name="word_cloud") sample 1000 la t.e.userInput as 's:UserInput' : t.e.userInput ~= ".(\w.+\s).+". This will return a version number which indicates that your query has been successfully saved under the word_cloud name.
More details can be found in Documentations at Save and Source.
In order to simplify and automate the steps from above, we have a powerful inquire-save-published-queries tool that saves and loads these results for you, with the possibilty of running scheduled jobs if required.
Note that for each unique Log Data Soruce (LDS) you wish to access, you need a new copy of this file, but you need to make sure to also keep the original template file named application.conf.
java -jar inquire-save-published-queries-1.1-SNAPSHOT.jar -Dconfig.file FILE_NAME.conf
This tool should be set up in a scheduled job or cron job.
Now you're ready to try the Power BI Desktop data connector for Teneo.
If the connector does not appear, try redoing the steps from the prerequisites.
The Teneo Inquire URL looks like this:
https://[your_team_name].data.teneo.ai/teneo-inquire/rest. You should replace [your team name] with the name of your team, which you can find in the top right corner when you log in to your environment in the browser.
The Log Data Source (LDS) is the last part of the Engine URL of your published solution. You can find it by opening the bots page in your browser.
For example, if the Engine URL of your solution is:
https://longberry-xxxxx.bots.teneo.ai/longberry_baristas_5jz1h5hxjb3j0931gx7qxwbns2, your LDS name would be longberry_baristas_5jz1h5hxjb3j0931gx7qxwbns2
Congratulations, you have now made a connection between your Teneo solution and Power BI!
The Teneo connector will transfer queries that are saved as 'Shared' to Power BI. The data retrieved from these queries are then used inside Power BI to create dashboards. In this step, we will demonstrate how you can quickly use the connector to build your first visual graph inside a dashboard.
You have now created your first visualization inside Power BI with the Teneo connector!
Please note that the video is only a demonstration and the selected queries should be applied to appropriate visualizations for a real use case.
Once you have connected your Teneo solution and Power BI, that data can be refreshed to automatically include new log data from new conversations with your bot. If necessary, you can also add more queries after the initial data load. To do this, simply write and publish your new queries in your Log Data Source (LDS) and then follow the steps from above on how to load data into your Power BI document, this time including the new queries which will now be accessible as long as they are published.
Teneo Query Language queries can be redesigned to aggregate transactional data by combining the
catd transformer with prefix operators.
Consider the following query:
listAll s.beginTime as 'Time', s.transactionCount as 'API Calls'
This query will list the number of api calls per session and can be rewritten to:
listAll time, sum s.transactionCount as 'API Calls' : catd(pattern="yyyy-MM-dd'T'hh':00:00Z') s.beginTime as time, which will aggregate the API Calls per hour.
Was this page helpful?