Kyvos offers a Query Playground feature that enables you to browse semantic models using popular query languages, such as SQL and MDX. You can write and execute the queries directly without relying on a visualization layer or third-party tools. This makes it easier to extract data for downstream applications, validate data in a semantic model, or debug query performance. Additionally, users can export querying data in JSON or CSV format.
To navigate to Query Playground, click the Toolbox and select Utilities > Query Playground.
The Query Playground page is displayed in a new window.
...
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Note
|
Selecting Semantic Model
Anchor | ||||
---|---|---|---|---|
|
...
MDX: To write MDX queries, you need to must select a semantic model. After selecting the semantic model, the dimensions and measures are displayed that are used for calculations.
Kyvos Copilot assists you in writing MDX queries by auto-correcting expressions based on dimensions and measures.
Using Kyvos Copilot, you can view:The history of the last 30 days is stored and can be filtered by category or custom text.
Reuse previous inputs and outputs to create new expressions. To create new expressions, users can reuse previous inputs and outputs automatically by clicking the Use me option. Alternatively, they can manually fill in the input by clicking the Copy to Clipboard option and paste it into the Input Prompt box to regenerate the output. For more information on how to use Kyvos Copilot to create MDX expressions, see the Creating automated MDX expressions using Kyvos Copilot section.
To use Kyvos Copilot with MDX queries, click the Ask Kyvos Copilot button located on the right-hand side of the page.The Calculations using Kyvos Copilot dialog is displayed.
SQL: To To write SQL queries, selecting a semantic model is not mandatory as the query itself contains folder name and semantic model.However, if you select a semantic model, you must write a query about it. After selecting a semantic model, the dimensions and measures are displayed. Expanding the dimensions or measures displays the columns used for them. To view the hierarchical details of a column, you need to hover over it. The details of the column will be displayed.
Executing query on Query Playground
...
On the Query Playground dialog box, click Export Data.
The Export Data dialog is displayed.
Select file format as JSON or CSV. By default, the JSON file format is selected.
JSON: Click the option to export the data in JSON file.
CSV: Click this option to export the data in a CSV (comma-separated values) file. By default, the information for CSV is filled. You can change the values as needed.
The following options will be displayed when exporting the data to JSON or CSV format.
Zipped: Select this checkbox to export the data in a zipped file. If you clear this option, the JSON or CSV file is downloaded.
Include Header (for CSV only): Select this checkbox to include the column header while exporting data in the CSV file.
Keep Measure formatting: Select this checkbox to keep the same measure formatting while exporting for JSON or CSV. If you clear this option, the measure in the exported JSON or CSV file will not be formatted. Include Header (for CSV only): Select this checkbox to include the column header while exporting data in the CSV file.