How to manage RedShift data

To query AWS RedShift database from the Main Menu, select RedShift.

Under the RedShift section from the context menu, select Query.

If this is the first time you query RedShift from ECG portal, a message is visible at the bottom of the Query window stating you have to grant permission to our system in order to execute the query. To grant permission, click Grant Permissions button.

Enter the master user password and click Connect.

Query

To query RedShift database, switch to the Query tab.

Under the Query text box, enter you query statement and click Run Query.

The result is outputted to the Result panel below. Regardless of your query, only the first 1000 records are outputted to the result window.

Additionally, you can export results to csv file by clicking Run Query To File; when you export results to file, all records are exported.

Create RedShift Table

To create new table, switch to the Create Table tab.

Enter table name.

To add a column to the table:

Repeat these steps for all columns you want to add.

When finished, click Create Table.

If you get an error or you have to modify the column, click Edit (from the first column) or Delete (from the last column).

Also, you can see the query used to create the table by clicking Show Query.

Import Data to RedShift

Data can be imported from the file located in S3 bucket.

To import data to the RedShift table, switch to the Import Data tab.

From the drop down list, select S3 Bucket where the import file is located.

Select file to import.

Select table you want to import data to.

Select configure import options, if necessary.

Click Run Import.

You can also see the import query by clicking Show Query.

Schedule Import

You can schedule imports to be executed on regular basis.

To schedule import, make all configurations under the Import Data tab and switch to the Schedule Import tab.

If you want to clear all data from the table before import, check Clear Data from Table Before Import.

Select occurrence of the import (e.g. Daily).

Select days and time.

Click Save Scheduler.

At any time you can edit, delete, or suspend schedule by clicking th appropriate action from the scheduler table.

Additionally, you can see the query that is executed by scheduler by clicking Query from the scheduler table.