WebFOCUS Hyperstage Import/Export Syntax

In this section:

WebFOCUS Hyperstage allows you to import data into a Hyperstage table or export data from a Hyperstage table.


Top of page

x
Importing Data

To import data into a Hyperstage table, use the following MySQL loading command:

LOAD DATA INFILE 'file_name' INTO TABLE tbl_name[FIELDS
[TERMINATED BY 'char']
[ENCLOSED BY 'char']
[ESCAPED BY 'char']
];

where:

file_name

Is the path to the file to be loaded.

tbl_name

Is the name of the table where the data will be loaded.


Top of page

x
Importing Data Using Remote Load

Using either the MySQL or the Hyperstage Loader, you can load data from a remote machine across the network using the LOAD DATA LOCAL INFILE syntax. This allows you to offload potentially heavy ETL processing to a separate server, keeping the Hyperstage server on a dedicated machine. This also allows you to save significant time when transferring large LOAD files over the network, which can typically limit load speed.

For more information, see LOAD DATA INFILE Syntax in the MySQL 5.x Reference Manual.

A few important notes:

To import data into a Hyperstage table from a remote machine across the network, use the following MySQL loading command (for more information about command options, see the Data Loading Guide):

LOAD DATA [LOCAL] INFILE 'file_name' INTO TABLE tbl_name 
[FIELDS 
[TERMINATED BY 'char'] 
[ENCLOSED BY 'char'] 
[ESCAPED BY 'char'] 
]; 

where:

file_name

Is the path to the file to be loaded.

tbl_name

Is the name of the table where the data will be loaded.

If LOCAL is specified, the file is read by the client program on the client host and sent to the server. The file can be given as a full path name to specify its exact location. If given as a relative path name, the name is interpreted relative to the directory in which the client program was started.

Note: Network speeds may limit the load speed. Exceptions and errors in the transfer are handled by the MySQL client, and will behave the same as the MySQL client.


Top of page

x
Exporting Data

To export data from a Hyperstage table, use the following MySQL export command:

SELECT … INTO OUTFILE 'file_name'
FIELDS
[TERMINATED BY 'string']
[ENCLOSED BY 'char']
[ESCAPED BY 'char']]
FROM 'tbl_name';

where:

file_name

Is the path to the file where data will be exported.

tbl_name

Is the name of the table from which the data will be retrieved.

For more information on export syntax, see SELECT Syntax in the MySQL 5.x Reference Manual.


Top of page

x
Optional FIELDS Clause

Several optional clauses exist for the MySQL LOAD command. All of these clauses are ignored by Hyperstage, with the exception of the FIELDS clause. You can also use the FIELDS clause when exporting data.

You can use the optional FIELDS clause to specify how values are provided in the input file. To use the FIELDS clause, the following must be true:

The FIELDS clause is ignored while importing data in binary format.

Within the FIELDS clause, you can use the following subclauses:


Top of page

x
Importing Files With Invalid Values

Hyperstage may abort a load when invalid values are found. Certain invalid values, however, can be loaded in Hyperstage. The following rules are used with invalid data:


WebFOCUS