Composing a Redshift Query¶
Compose a Redshift query using the query composer on the Analyze page.
Hadoop 2, Presto, and Spark clusters support Redshift queries, and the queries do not need run on a cluster. See Mapping of Cluster and Command Types for more information.
You must have an existing data store to query it. Create a data store in Explore if it does not exist.
Perform the following steps to compose a Redshift query:
Using the Supported Keyboard Shortcuts in Analyze describes the supported keyboard shortcuts.
Navigate to the Analyze page and click Compose. Select Redshift Query from the Command Type drop-down list.
Query Statement is selected by default from the drop-down list. Depending on your choice, perform the appropriate actions:
If you want to use Query Statement, enter the RedShift query in the text field. The following figure shows a sample Redshift query.
If you want to use Query Path, select Query Path, then specify the Cloud storage path that contains the Redshift query file. The following figure shows a sample Redshift query that is executed by using the Query Path option.
Pick a data store from the Redshift Data Store drop-down list.
Click Run to execute the query. Click Save if you want to run the same query later. (See Workspace for more information on saving queries.)
The query result is displayed in the Results tab and the query logs in the Logs tab. The Logs tab has the Errors and Warnings filter. For more information on how to download command results and logs, see Download Results and Logs from the Analyze UI.