Data Studio allows viewing and managing frequently used SQL queries. The history of executed SQL queries is maintained only for the SQL Terminal.
Follow the steps to view the SQL history:
The SQL History dialog box is displayed.
SQL history scripts are not encrypted.
The number of queries saved in the SQL History dialog box is based on the value defined in Preferences > Editor > SQL History pane. Refer to the SQL History section to modify the SQL History count. Data Studio overwrites the older queries into the SQL history after the list is full. The executed query is automatically stored in the list.
The SQL History dialog box has the following columns:
Deleting the connection profile deletes the history. If the SQL History dialog box is closed, the query is not removed from the list.
You can perform the following operations in the SQL History dialog box:
Follow the steps to load the SQL query into the SQL terminal:
The query is appended to the cursor position in the SQL Terminal.
The Load in SQL Terminal and close History button loads selected queries into the SQL Terminal and closes the SQL History dialog box.
Follow the steps to load selected SQL queries into the SQL terminal:
The queries are appended to the cursor position in the SQL Terminal.
If you continue the execution on error, then each statement in the terminal will be running as a scheduled job and runs one after the other. The execution status is updated on the console and job is listed in the progress bar. When the time difference between Job Execution, Progress Bar Update and Console Update is very minimal, you will not be able to open the progress bar and stop the execution. In such scenarios you have to close the SQL terminal to the terminate execution.
Regarding to load more data of result tab, you have to scroll down to bottom in order to load more data, which is inconvenient in some use cases. Currently, DS supports a loading more record button which makes it easier to trigger the loading more data action.
Follow the steps to load more records
List all the required records.
Follow the steps to delete a SQL query from the SQL history list:
A confirmation pop up window is displayed.
Follow the steps to delete all SQL queries from the SQL History list:
A confirmation pop up window is displayed.
You can pin queries that you do not want Data Studio to delete automatically from the SQL History. You can pin a maximum of 50 queries. Pinned queries are displayed at the top of the list. The value set in SQL history count does not affect the pinned queries. Refer to SQL History for additional information on SQL history count.
The pinned queries appear on top once the SQL History window is closed and re-opened.
Follow the steps to pin a SQL query:
The Pin Status column displays the pinned status of the query.