Loading data with named pipes

You can use a named pipe to load data from external tables.

To use a named pipe to load data from an external table, follow these steps:

  1. Specify the named pipes in the DATAFILES clause of the CREATE EXTERNAL TABLE statement in SQL.
  2. Create the named pipes that you specified in the DATAFILES clause.
    Use operating-system commands to create the named pipes.

    Use the mknod UNIX command with the -p option to create a named pipe. To avoid blocking open problems for pipes on UNIX, start separate UNIX processes for pipe-readers and pipe-writers or open the pipes with the O_NDELAY flag set.

  3. Open the named pipes with a program that reads the named pipe.
  4. Execute the INSERT statement in SQL.
    INSERT INTO employee SELECT * FROM emp_ext;
Important: If you do not create and open the named pipes before you execute the INSERT statement, the INSERT succeeds, but no rows are loaded.