Fixing a query in Hue

You can use the SQL AI Assistant to fix a broken SQL query. Hue identifies the issues in SQL syntax and provides the corrected version.

Your administrator must have configured and set up the required infrastructure for you to use the SQL AI Assistant. See About setting up the SQL AI Assistant in CDW.
  1. Log in to the Data Warehouse service as DWUser.
  2. Open Hue corresponding to your Virtual Warehouse.
  3. Insert a SQL query in the Hue editor that you would like to fix.
  4. Click Assistant on the Hue SQL editor:
    Screenshot showing how to launch the SQL AI Assistant from the Hue web interface.
  5. Click FIX.
    Screenshot showing how to use the SQL AI Assistant in Hue to fix a SQL query.
    Hue displays the original and the fixed SQL query in a side-by-side comparison.
    Screenshot showing the original and the fixed SQL query generated using SQL AI Assistant in Hue along with an explanation.
    Click Insert to insert the fixed query in the Hue editor and run it.