Streaming data with named pipes

To load a large amount of data, use a named pipe to stream the data to external tables or to the dbload command. The dbload command loads the data as it fills the pipe and does not exit until it receives the end-of-file indicator. The stdin option is supported for the dbload command.

About this task

The following procedure shows how to use a named pipe to load tables with the dbload command. In the commands, substitute your own pipe, database, table, file, and folder names.

Procedure

  1. Create a zero-length, named pipe file by issuing the Linux® mkfifo command:
    mkfifo mypipe
  2. In a foreground session, issue the following command:
    cat /export/home/nz/my_db/my_table.dat > mypipe
  3. In a background session, issue the following command:
    dbload -db my_db -t my_table -delim "|" -df /export/home/my_db/mypipe