Setting Up the airportdb Database  /  Loading airportdb into HeatWave

5 Loading airportdb into HeatWave

See Manage Data in HeatWave with Workspaces for how to load the airportdb database from a MySQL DB System into HeatWave on AWS.

The following procedure describes how to load the airportdb database from a MySQL DB System into HeatWave on OCI.

Before you begin:

To load the airportdb into HeatWave:

  1. SSH to the Compute instance from your local machine using the opc user and the public IP address of the compute instance. For additional information about connecting to a Compute instance, see Connecting to an Instance.

    ssh opc@computeInstancePublicIP
  2. Start MySQL Shell and connect to the MySQL DB System's Endpoint (its private IP address). For additional information about connecting to a DB System, see Connecting to the MySQL DB System with SSH and MySQL Shell.

    mysqlsh Username@IPAddressOfMySQLDBSystemEndpoint
    Note

    Alternatively, you can connect to the DB System using a MySQL Client:

    mysql --host IPAddressOfMySQLDBSystemEndpoint -u Username -p
  3. Change the MySQL Shell execution mode to SQL and run the following Auto Parallel Load command to load the airportdb tables into HeatWave.

    MySQL>JS> \sql
    MySQL>SQL> CALL sys.heatwave_load(JSON_ARRAY('airportdb'), NULL);

Tables can be unloaded from HeatWave using the following statements:

USE airportdb;

ALTER TABLE booking SECONDARY_UNLOAD;
ALTER TABLE flight SECONDARY_UNLOAD;
ALTER TABLE flight_log SECONDARY_UNLOAD;
ALTER TABLE airport SECONDARY_UNLOAD;
ALTER TABLE airport_reachable SECONDARY_UNLOAD;
ALTER TABLE airport_geo SECONDARY_UNLOAD;
ALTER TABLE airline SECONDARY_UNLOAD;
ALTER TABLE flightschedule SECONDARY_UNLOAD;
ALTER TABLE airplane SECONDARY_UNLOAD;
ALTER TABLE airplane_type SECONDARY_UNLOAD;
ALTER TABLE employee SECONDARY_UNLOAD;
ALTER TABLE passenger SECONDARY_UNLOAD;
ALTER TABLE passengerdetails SECONDARY_UNLOAD;
ALTER TABLE weatherdata SECONDARY_UNLOAD;