The Initialization process 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

The Initialization process 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.

The reader process will initialize the NPAM module via an Initialization string and this article details the various parameters that are initialized during this process.

NPAM – Initialization string

The initialization string contains the sets of parameter keywords and their respective values (to be initialized with). The format of the Initialization string is as follows:

"keyword1=value1 keyword2=value2 keyword3=value3 ..."

  • keyword identifies the initialization parameters
  • value is either an integer or a string, sometimes enclosed in single or double quote characters

The Initialization string is used in the Teradata Client utility job script to specify or override the default values of the parameters. The Initialization string can contain the values of the parameters listed below.

  1. block_size
  2. confirm_fallback_deletion
  3. fallback_directory
  4. fallback_file
  5. log_directory
  6. log_level
  7. need_full_block
  8. pipe_wait
  9. signature_check

The NPAM parses the Initialization string, validates and sets the parameters with their respective values (specified in the Initialization string).

Example illustrating the Initialization string

The NPAM can be initialized using the following statement in the TPUMP job script.  Please note that the string displayed within the single quotes 'log_level= ... ' is the initialization string.

.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 following table details the purpose and significance of each parameter used in the Initialization string. 

Parameter

Usage

Description

block_size

block_size=n

or

b=n

Block size (in bytes) of the data transfer operation where n is an integer from 1 to 2147483647.  The default  value of the block_size parameter is 65536 bytes.

confirm_fallback_deletion

confirm_fallback_deletion=y

or

cfd=y

The values can be either 'y', 'n', 'yes' or 'no'.

This flag informs the NPAM whether to present a confirmation prompt before deleting the fallback data file. The default value of confirm_fallback_deletion is ‘no’.

fallback_directory

fallback_directory=directorypath

or

fd=directorypath

Path of the fallback data file directory.

The default directory of the fallback_directory parameter is:

  • /opt/np_axsmod on UNIX systems
  • %TEMP% or %WINDIR%\temp on Windows systems

fallback_file

fallback_file=filename

or

ff=filename

Name of the fallback data file.

log_directory

log_directory=directorypath

or

ld=directorypath

Path of the log file directory.

The default directory of the log_directory parameter  is:

  • /tmp on UNIX systems
  • %TEMP% or C:\ on Windows systems

log_level

log_level=n

 

or

 

ll=n

The values can be 0, 1, 2, 3, 4, 5 or 6.

The default value of log_level is ‘0’. The significance of each value and the level of details to be posted to the log file is presented below:

“0” : Indicates Disable.

Disables the log operation. This is the default log_level value of the log_directory path.

“1” : Indicates Critical.

Logs events where a critical resource, such as memory or its message strings cannot be obtained.

“2” : Indicates Error.

Logs error conditions.

“3” : Indicates Warning.

Logs unusual events that do not halt processing.

“4” : Indicates Information.

Logs operational events or statistics.

“5” : Indicates Debug.

Logs details normally required for debugging purpose.

“6” : Indicates Trace.

Logs all available information about each I/O operation.

need_full_block

need_full_block=n

or

nfb=n

The values can be either 'y', 'n', 'yes' or 'no'.

Used to determine if a full data buffer block is required prior to returning to the calling process.  The default value of need_full_block is ‘yes’.

pipe_wait

pipe_wait=n

or

pw=n

Holds the sleep interval (in milliseconds) for polling the pipe when need_full_block=no. By default, the pipe_wait is set to 10 milliseconds.

signature_check

signature_check=checklevel

or

sc=checklevel

 

 

The values can be 0, 1 or 2.

Sets the signature check level.  The default value of the signature_check is ‘2’. The significance of each value is presented below:

“0” : Indicates Disabled.

A signature is neither calculated nor checked.

“1” : Indicates Enabled / No Return

Calculates, checks the signature and logs a warning if the check fails. It does not return an error condition.

“2” : Indicates Enabled / Return

Calculates, checks the signature and logs an error if the check fails. It returns an error condition.