Compose queries
You can write and edit queries using the Composer.
-
Select a database from the database dropdown menu.
All the tables within the database along with the table count are displayed.
- Search for the required tables. You can also search for a table using the Search field.
- Enter the query in the worksheet tab.
Each worksheet is identified by a unique name and you can add worksheets clicking the plus icon. The worksheet tab provides auto completion features. As you start entering the query, the worksheet suggests SQL commands, keywords, and table columns according to the query.
-
Perform the desired operation on the query.
- Click Execute to run the query, or press Ctrl + Enter on Windows and control + return on XOS. Make sure that you press the keyboard shortcut while you are in the query editor.
- Click Stop to stop the query execution.
- You can save the result table in HDFS or you can also download it on your local computer in the CSV format by clicking the download button.
- Click Explain to view the query details in the form of a block diagram.
- You can download the explain plan on your local computer in the JSON format by clicking the download button.
- Click the save icon on the worksheet tab to save the worksheet with a different name.
- Click the Saved tab to view saved queries. You can also edit or delete the saved queries.