...
- Go to IDEA Tools and select PA SQL Console.
- Select the Datamart / Data Feed / Data Source to query.
- Choose the mode using the 'Use SQL' button. This example shows the SQL mode.
- Click the "table" icon next to it and select columns to use.
Select only those columns you really want to work with. The larger number, the bigger performance impact. - In the upper pane of the window enter your SQL query.
- Click the 'Generate Groovy SQL element' button. It executes a template and pre-generates a code in the bottom pane.
- Customize this code for your use case.
There is a placeholder "__SQL__" which is then at runtime replaced by the content in the upper pane.
The last linetoResultMatrix
is there just to display the result, you can remove it. - Run the query by clicking the icon at top right (or pressing Ctrl+Enter).
- You can then copy the lines from the bottom pane into your logic – to help you create a working PA SQL elementcreate a real element. You need to replace the "__SQL__" with the content of the upper pane (SQL).