Pyramid's OpenAI integration lets you use AI to generate SQL, MDX, DAX, Python, or R statements. This is useful if you want to generate code quickly, or don't know the syntax, for instance, To do this, click the Ask Chat GPT icon from the Properties panel. In the text field at the top of the "Generate Your SQL" dialog, enter a description of the query you want to perform.
- Scripted Sources: generate a Python or R script and use it as a data source.
- Scripting Nodes: generate Python or R scripts and inject them into the Data Flow.
- Query Node: generate SQL, SOQL, MDX, or DAX scripts to run queries against a data source.
- Master Flow: generate SQL expressions to directly query a database.
Use AI to Generate Your Script
The dialog for generating your script contains the following fields and buttons:
- Text Field: enter a description of the query you want to perform and click the arrow to enter your query description and return a it as a script. (red highlight below).
- Script Window: the AI-generated script will appear in the scripting window (green highlight below).
- Explain Code: open an AI-generated explanation of the script that was returned in the scripting window (yellow arrow below).
- Apply: apply the script to the Query node.
- Cancel: close the dialog without applying any changes.
When generating a script for a Query node, the dialog will also display a "Schemas" panel, which exposes the database schema from which you can select the dimensions, elements, and views that are relevant to your description to simplify the query,
Explaining the Script
Use the Explain Script function to understand the current script by producing an AI-generated explanation of what it does. This explanation can be generated regardless of the method used to write the script.
Warning: AI-generated assets are generated from public domain algorithms, which can produce both erroneous and inconsistent/ random results. Use at your own risk.