Documentation Home
HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 2.1Mb
PDF (A4) - 2.1Mb


2.2.3.3 Running Auto Parallel Load

Run Auto Parallel Load in dryrun mode first to check for errors and warnings and to inspect the generated load script. To load a single schema in dryrun mode:

mysql> CALL sys.heatwave_load(JSON_ARRAY("tpch"), JSON_OBJECT("mode","dryrun"));

In dryrun mode, Auto Parallel Load sends the load script to the heatwave_autopilot_report table only. See Section 2.7.9, “Autopilot Report Table”. It does not load data into HeatWave.

If Auto Parallel Load fails with an error, inspect the errors with a query to the heatwave_autopilot_report table.

mysql> SELECT log FROM sys.heatwave_autopilot_report
          WHERE type="error";

When Auto Parallel Load finishes running, query the heatwave_autopilot_report table to check for warnings.

mysql> SELECT log FROM sys.heatwave_autopilot_report
          WHERE type="warn";

Issue the following query to inspect the load script that was generated.

mysql> SELECT log->>"$.sql" AS "Load Script"
          FROM sys.heatwave_autopilot_report 
          WHERE type = "sql" ORDER BY id;

Once you are satisfied with the Auto Parallel Load CALL statement and the generated load script, reissue the CALL statement in normal mode to load the data into HeatWave. For example:

mysql> CALL sys.heatwave_load(JSON_ARRAY("tpch"), JSON_OBJECT("mode","normal"));
Note

Retrieve DDL statements in a table or use the following statements to produce a list of DDL statements to easily copy and paste.

mysql> SET SESSION group_concat_max_len = 1000000;
mysql> SELECT GROUP_CONCAT(log->>"$.sql" SEPARATOR ' ')
          FROM sys.heatwave_autopilot_report
          WHERE type = "sql" ORDER BY id;

The time required to load data depends on the data size. Auto Parallel Load provides an estimate of the time required to complete the load operation.

Tables are loaded in sequence, ordered by schema and table name. Load-time errors are reported as they are encountered. If an error is encountered while loading a table, the operation is not terminated. Auto Parallel Load continues running, moving on to the next table.

When Auto Parallel Load finishes running, it checks if tables are loaded and shows a summary with the number of tables that were loaded and the number of tables that failed to load.