17.10 - LOAD - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Database Utilities

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Configuration
Publication ID
B035-1102-171K
Language
English (United States)

The LOAD command moves dump data from files created by an unload operation into tables on a database.

Syntax

LOAD [ database. ] table [ FALLBACK ] FILE = filepath ;

Syntax Elements

database
Name of the database in which the table resides. Use a period (.) to separate the database name from the table name.
table
Name of the table to receive dump data.
The table cannot already exist. However, the database in which the table will reside must already exist.
FALLBACK
Option that creates a fallback copy of the table specified in the LOAD command as well as the tables with the same name ending in _L, _C, and _M.
filepath
The path of the file created in a previous unload operation.
The filepath specification is required.
The filepath is specified as directory/filename.
Dul expects dump files to be in a compressed, gzip format. For compatibility, dul can load compressed files regardless of whether the file name includes the .gz extension.

Usage Notes

Before you can perform a load operation, your username specified in the logon ID must have CREATE, DROP, and SELECT privileges on tables in the DBC database.

If you do not have the appropriate privileges, the system returns an error message, and the operation is canceled.

Before you can perform a load operation, dul displays summary information, such as which processors are selected and error dates about the selection criteria that is set. After the load operation, dul displays event codes, if any exist, for the specified processors. For information on setting selection criteria, see SELECT.

As a general rule, type a DROP command before performing a load operation. This removes any existing tables that might have the same name as the name specified on the current LOAD command. For more information, see DROP.

Dul uses the FastLoad utility to improve transfer speed. However, you can still transfer dump files on your host to a database using BTEQ.

In most instances, a load operation is not performed at a customer site.

For detailed information on privileges, see Teradata Vantage™ - Database Administration, B035-1093 or consult your system administrator.

For more information about the FastLoad utility, see Teradata® FastLoad Reference, B035-2411.

For information about BTEQ, see Basic Teradata® Query Reference, B035-2414.

Example: Checking for duplicate table names in the Crashdumps database

To check whether tables with the same name exist in the crashdumps database, type the following:

HELP DATABASE crashdumps ;

The following list of all the tables in the crashdumps database appears:

*** Sending HELP DATABASE crashdumps to Teradata Database.
*** Help information returned.  4 rows.
   CL100
   CL100_C
   CL100_L
   CL100_M

Since no tables have the same name, you can type the LOAD command next. If tables with the same name already exist, verify that they are not needed and then use the DROP command to delete them from the Crashdumps database.

Example: Loading dump information to tables

To transfer dump information to tables on Vantage, type the following:

load crashdumptable1 file=TPFILE;

The following appears:

load CRASH_20170219_004121_02 file=sanity;

*** Creating table 'CRASH_20170219_004121_02'.
*** Table has been created.
*** Loading data into 'CRASH_20170219_004121_02'
*** Logging on Amp sessions.
*** Growing Buffer to 789
*** Growing Buffer to 977
*** Growing Buffer to 2198
*** Growing Buffer to 2427
*** Growing Buffer to 2481
*** Growing Buffer to 2662
*** Growing Buffer to 2758
*** Growing Buffer to 4118
*** Starting Row 10000 at Mon Feb 20 19:25:49 2017

*** Starting Row 20000 at Mon Feb 20 19:26:01 2017
.
.
.

*** Starting Row 70000 at Mon Feb 20 19:27:06 2017

*** END LOADING phase...Please stand by...
Loading data into CRASH_20170219_004121_02 completes successfully.

Dump Unload/Load - Enter your command: