Appearance
3. Load with the Small Cluster
You can assume that the load operation is run by a single user for a short period of time (no concurrency). Therefore, the small cluster is suitable for the job. When the load is finished, the cluster can be suspended. The following steps should be run as the initial login user. Alternatively, you could create a new user with equivalent privileges.
- Create a database named
premdb
, either by typing the SQL command in the Query Editor and clicking Run or by clicking the cube icon, then Databases > +Database.
For example:
Tip: CREATE DATABASE
and other high-level metadata commands do not require a running cluster; they are run by the front-end PostgreSQL database.
- Create and load five
premdb
sample tables by running the script in the Sample Catalog. Start by clicking the Sample Catalog button in the top-right corner of the Query Editor.
- Select Premier League Database, then click Setup/Load 1.
The setup script is displayed. Select your instance, the premdb
database, the small-2node-cluster
, and the initial login role.
Note: When you select an auto-resume cluster in the Query Editor connection tab and run any command, the cluster will resume if it is currently suspended. This may take a little while.
- Run the setup script. The resulting five tables that it creates and loads reside in the
premdb
database in a separatepremdb
schema. - Go back to the Sample Catalog, then click Setup/Load 2 to create the
newmatchstats
table by running a second script (newmatchstats.ddl
).
Tip: If you want to try using the Load Assistant, see Loading a Table via the Load Assistant, which shows how to load an additional 25 million rows into the newmatchstats
table.
- Inspect the list of tables and drill down. For example, click database
premdb
, then schemapremdb
, then tablematch
. The details for each table are shown, including abbreviated data type indicators and anN
marker for columns that were declared nullable. - Suspend the
small-2node-cluster
or allow it to auto-suspend after 300 seconds of inactivity.
For example:
Parent topic:Tutorial: Creating and Using Clusters