Query pro mode query-pro-mode
Query pro mode is an SQL editor-based workflow that guides you through the process of generating insights with custom SQL queries in the Adobe Experience Platform UI. Before you can generate insights with custom SQL queries, you must first create a dashboard.
Compose SQL compose-sql
Once you have chosen to create a dashboard with query pro mode, the Enter SQL dialog appears. Select a database (insights data model) to query from the dropdown menu, and input a suitable query for your dataset in the query pro editor.
See the Query Editor user guide for information on its UI elements.
Query parameters query-parameters
To include global or date filters your query must use query parameters. When composing your statement in query pro mode, you must provide sample values if your query uses query parameters. The sample values allow you to execute the SQL statement and build the chart. Note that the sample values you provide when composing your statement are replaced by the actual values you select for the date or global filter at runtime.
CONSENT_VALUE_FILTER
is used in the SQL as a query parameter for a global filter. See the global filter documentation for more information on how to do this.To execute your query, select the run icon (
Populate widget populate-widget
The widget composer is now populated with the columns from the executed SQL. The type of dashboard is indicated in the top left, in this case it is Manual SQL Entry. Select the pencil icon (
To create your widget, use the attributes listed in the Attributes column. You can use the search bar to look for attributes or scroll the list.
Add attributes add-attributes
To add an attribute to your widget, select the plus icon (
In this donut chart example, the options are size and color. Color breaks down the donut chart results, and the size is the actual metric used. Add an attribute to the Color field to split the results into different colors based on their composition of that attribute.
![The up and down arrow icon.](./media_15c6d199f40c28ee6f624842d5562edb56303589c.png?width=750&format=png&optimize=medium)
To change the type of graph or chart of your widget, select from the available options of the Marks dropdown. The options include Line, Donut, Big number, and Bar. Once selected, a preview visualization of your widget’s current settings is generated.
Widget properties properties
Select the properties icon (
Save your widget save-widget
Saving in the widget composer saves the widget locally to your dashboard. If you wish to save your work and resume later, select Save. A tick icon underneath the widget name indicates that the widget has been saved. Alternatively, when you are satisfied with your widget, select Save and close to make the widget available to all other users with access to your dashboard. Select Cancel to abandon your work and return to your custom dashboard.
Edit your dashboard and charts edit
Select Edit to edit your entire dashboard or any of your insights. From the edit mode, you can resize widgets, edit your SQL, or create and apply global and temporal filters. These filters constrain the data displayed in your dashboard widgets. It is a convenient way to quickly update and fine-tune your insights for different use cases.
Select Add filter to create either a Date filter or a Global filter. Once created, all global and date filters are available from the filter icon (
Edit, duplicate, or delete an insight
See the Custom Dashboard guide for instructions on how to edit, duplicate, or delete an existing widget.
Next steps
After reading this document, you now know how write SQL queries in the Adobe Experience Platform UI to generate charts for your custom dashboards. Next, you should learn how to further enrich yourt data by creating a date filter, or creating a global filter.
You can also learn more about other Customized Insights features including the different viewing options for you SQL analysed data or how to view the SQL behind your custom insights.