SQL Insights for extended app reporting
Use custom SQL queries to effectively extract insights from diverse structured datasets. Technical people can use query pro mode to perform complex analysis with SQL and then share this analysis with non-technical users through charts on your custom dashboard or export them in CSV files. This method of insight creation is well-suited for tables with clear relationships and allows for a greater degree of customization within your insights and filters that can suit niche use cases.
To generate insights from SQL, you must first create a dashboard.
Create a custom dashboard create-custom-dashboard
To create a custom dashboard, select Dashboards from the left navigation panel to open the Dashboards workspace. Next, select Create dashboard.
The Create dashboard dialog appears. There are two options from which to choose your dashboard creation method. To create your insights you can either use an existing data model with the Guided design mode or your own SQL with the Query pro mode.
Using an existing data model has the benefits of providing a structured, efficient, and scalable framework tailored to your specific business needs. To learn how to create insights from an existing data model, refer to the custom dashboard guide.
Insights generated from SQL queries offer far greater flexibility and customization. Technical people can use query pro mode to perform complex analysis on SQL and then share this analysis with non-technical users through this dashboard capability. Select Query pro mode followed by Save.
Query pro mode overview 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 ÃÛ¶¹ÊÓƵ 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 ( ). The Query Editor displays the results tab. Next, to confirm your configuration and open the widget composer, select Select.
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 edit the SQL at any point.
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 ( ) next to an attribute name. The dropdown menu that appears allows you to add an attribute to the chart from the options determined by your SQL. Different chart types have different options, such as an X and Y axis dropdown.
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.
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.
Advanced table attributes advanced-attributes
To apply automatic sorting capabilities for any or all columns in your tables, select Edit to edit your entire dashboard.
Select the ellipsis (...
) in the table chart where you want to add column sorting, then select Edit.
To enable sorting for any column, check the Sortable boxes.
Select the properties icon ( ) in the right rail to open the Properties panel. In the Properties panel, use the drop down to select the Default sort column, then use the drop down to select the Sort direction. Finally, select Save and close.
To learn more about using the sort, resizing columns, and pagination features, refer to View more.
Widget properties properties
Select the properties icon ( ) in the right rail to open the properties panel. In the Properties panel, enter a name for the widget in the Widget title text field. You can also rename various aspects of your chart.
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 ( ) of your dashboard.
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 ÃÛ¶¹ÊÓƵ 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.