ÃÛ¶¹ÊÓƵ

Query logs

IMPORTANT
Certain query logs features are currently in a limited release and not available to all customers. Your UI may appear slightly differently without an edit icon. Also, the process of selecting a query name may to navigate to the Query Editor instead of the Query log details view.

ÃÛ¶¹ÊÓƵ Experience Platform maintains a log of all query events that occur through both the API and the UI. This information is available in the Query Service UI from the Logs tab.

The log files are generated automatically by any query event and contain information including the SQL used, the status of the query, how long it took, and last run time. You can use query log data as a powerful tool for troubleshooting inefficient or problem queries. More comprehensive log information is kept as part of the audit log feature and can be found in the audit log documentation.

Check query logs check-query-logs

To check the query logs, select Queries to navigate to the Query Service workspace and select Log from the available options.

NOTE
Both system queries and dashboard queries are excluded by default. See the filters section for information on how to refine the displayed logs based on your settings.

The Platform UI with Queries and Log highlighted.

Query Service logs are presented in a customizable table format. To customize the table columns, select the settings icon ( A settings icon. ) to the right of the screen. A Customize Table dialog appears where each column can be deselected.

You can also search for logs relating to specific query templates by typing the template name into the search field.

The Queries Log workspace with the search bar and manage column table dropdown highlighted.

A description for each of the log table columns can be found in the Log section of the Query Service overview.

Discover log data

Each row represents log data for a query run associated with a query template. Select any row from the table to populate the right sidebar with log data for that run.

The Queries Log workspace with a row selected and the log data in the right sidebar highlighted.

In the log details panel, you can perform a variety of actions. You can run the query as CTAS, which creates a new output dataset, see or copy the complete SQL query that was used in the run, or delete the query.

NOTE
The option to Run as CTAS is only available for a SELECT query.

The Queries Log workspace with a row selected, Run as CTAS, Delete query and the copy SQL icon highlighted.

IMPORTANT
Certain query logs features are currently in a limited release and not available to all customers.

You can also select a query template name from the Name column to navigate directly to the Query log details view.

NOTE
If the query was created using the API and no template name was provided during initialization, the first few dozen characters of the SQL query are displayed instead.

The Query log details view.

Edit logs edit-logs

Next to each row’s template name or SQL snippet is a pencil icon ( A pencil icon. ) that you can use to navigate to the Query Editor. The query is then pre-populated in the editor for editing.

The Queries Log workspace with a pencil icon highlighted.

Filter logs filter-logs

You can filter the list of query logs based on a variety of settings. Select the filter icon ( The filter icon. ) at the top left of the workspace to open a set of filter options in the left rail.

The Queries Log workspace with the filter icon highlighted.

The list of available filters is displayed.

The Queries Log workspace with the filter options displayed and highlighted.

The following table provides a description of each filter.

Filter
Description
Exclude dashboard queries
This checkbox is enabled by default and excludes logs generated by the queries used for generating insights. These queries are system generated and obscure the records of user generated logs necessary for monitoring, administering and troubleshooting. To view system generated logs, de-select the checkbox.
Exclude system queries
This checkbox is enabled by default and excludes logs generated by the system. System-generated queries often include background tasks or maintenance operations that may not be relevant for user monitoring, administration, or troubleshooting purposes. If you need to inspect system-generated logs, de-select this checkbox to include them in your log view.
Start date
To filter the logs for queries that were created during a specific period, set the Start and End dates in the Start date section.
Completed date
To filter the logs for queries that were completed during a specific period, set the Start and End dates in the Completed date section.
Status
To filter logs based on the Status of the query, select the appropriate radio button. The available options include Submitted, In progress, Success, and Failed. You can only filter logs based on one status condition at a time.
Client
To filter logs based on the query client used, enter one of the following accepted values into the free text field: API, ÃÛ¶¹ÊÓƵ Query Service UI, or QsAccel.
My queries
Use the My queries toggle to filter the logs for queries executed by you.
query log ID
To filter based on the unique log ID of a query, enter the log ID into the free text field. This information can be found in the Log details.

Any applied filters are displayed above the filtered log results.

The Log tab of the Queries workspace, with the list of applied filters highlighted.

Next steps

By reading this document, you now have a better understanding of how query logs are accessed and used in the Query Service UI.

See the UI overview, or the Query Service API guide to learn more about Query Service capabilities.

See the monitor queries document to learn how Query Service improves the visibility of scheduled query runs.

recommendation-more-help
ccf2b369-4031-483f-af63-a93b5ae5e3fb