Different operating modes of the NPAM

Tools
Tools covers the tools and utilities you use to work with Teradata and its supporting ecosystem. You'll find information on everything from the Teradata Eclipse plug-in to load/extract tools.
Teradata Employee

Different operating modes of the NPAM

The Teradata Named Pipe Access Module (NPAM) provides an inter-process communication link between a writer process (such as FastExport) and a reader process (such as FastLoad).  The NPAM can also be used by Teradata Parallel Transporter (TPT) for data transfer.

This article details the different modes in which Named pipes are opened and used by NPAM for data transfer activity.

Different modes of Named pipes

The Named pipes can be opened in two different modes (namely blocking and non-blocking) by the NPAM. Please note that the NPAM supports blocked read and write operations by default.

In blocking mode, the reader process gets blocked when it tries to read an empty pipe and the writer process gets blocked when it tries to write on the pipe when it is full.  In non-blocking mode, the reader process returns error when the pipe is empty and the writer process returns error when the pipe is full.

The Named pipe operating modes are depicted below:

                      

The User’s choice

The user can choose the mode of the Named pipe to be used (for data transfer) by setting the need_full_block parameter (in the Initialization string) with the appropriate value. Thereby, the user can override the default mode of creation of the Named pipe by the NPAM.

If the value of need_full_block parameter is

  • yes, then the NPAM creates the Named pipe in blocking mode.  This is the default.
  • no, then the NPAM creates the Named pipe in non-blocking mode.

Examples

  1. The following statement can be given in the TPUMP job script to create the Named pipe in the blocking mode.  Please note that the “nfb” parameter is set to ‘y’ for this case.
.IMPORT

INFILE np_one /* “np_one” is the name of the Named pipe */

LAYOUT LAY1A /* LAY1A is the data layout name */

APPLY LABELA /* LABELA is the label name */

FORMAT TEXT /* TEXT is the data format type */

axsmod np_axsmod.so 'log_level=5 log_directory=. buffer_size=6500 fallback_directory=. fallback_file=test.fbf confirm_fallback_deletion=y need_full_block=y pipe_wait=320 signature_check=2';

/* the string adjacent to np_axsmod.so is the Initialization string */
  1. The following statement can be given in the TPUMP job script to create the Named pipe in the non-blocking mode.  Please note that the “nfb” parameter is set to ‘n’ for this case.
.IMPORT

INFILE np_one /* “np_one” is the name of the Named pipe */

LAYOUT LAY1A /* LAY1A is the data layout name */

APPLY LABELA /* LABELA is the label name */

FORMAT TEXT /* TEXT is the data format type */

axsmod np_axsmod.so 'log_level=5 log_directory=. buffer_size=6500 fallback_directory=. fallback_file=test.fbf confirm_fallback_deletion=y need_full_block=n pipe_wait=320 signature_check=2';

/* the string adjacent to np_axsmod.so is the Initialization string */

Named pipe creation process

The process of creation of the Named pipe based on the user selection is depicted in the below flowchart.