Running SQL queries in SQL worksheets

Complete the following steps to run SQL queries:

  1. Log in to IBM watsonx.data experience.

  2. From the watsonx navigation menu, click Metastore and select Data objects tab.

  3. In the Metastore window, click New SQL Worksheet.

  4. Select an engine from the Engine menu.

  5. In the SQL editor, enter your SQL query.

  6. Open the Run Script Dropdown to run the query. The available options are:

    • Run Selection: Executes only the portion of the query that you have highlighted or selected. This is useful when you want to test or run a specific part of a larger script without executing the entire code.

    • Run to Cursor: Runs the script starting from the beginning up to the point where your cursor is placed. Ideal for step-by-step execution when debugging or analyzing sections incrementally.

    • Run from Cursor: Executes the script starting from the cursor position to the end of the script. Helpful when you want to skip initial parts and continue execution from a specific point.

    • Run Script: Runs the entire script from start to finish. Use this when you want to execute the complete query without any restrictions.