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 below block diagram (which is self-explanatory) depicts the transfer of data between a writer process (such as the Teradata FastExport utility) and a reader process (such as the Teradata FastLoad utility). The reader process interacts with Named Pipes Access Module via the Teradata Data Connector Module. It is not necessary for the writer process to use the Teradata Data Connector to interact with the NPAM.
The data transfer between writer process and reader process is performed as follows:
The reader process (such as the Teradata TPUMP) can use the following statement in the job script to use the NPAM module for the data transfer.
.IMPORT INFILE np1 /* where “np1” is the name of the Named pipe used */
LAYOUT LAY1A /* where “LAY1A” is the name of the data LAYOUT used */
APPLY LABELA /* where “LABELA” is the name of the LABEL used */
FORMAT fastload /* where “fastload” is the type of data FORMAT used */
axsmod np_axsmod.so 'll=5 ld=. b=32000 fd=. cfd=n sc=2' ;
/* “np_axsmod.so” is the NPAM library name */
/* ‘Quoted string’ given adjacent to the NPAM library
is the Initialization string which is used to
Initialize the NPAM module */
The writer process (such as Teradata FastExport) can use the following statement in the job script to write the data (to be transferred) on to the Named pipe. The Teradata FastExport is dependent on the Data Connector to perform the I/O operations. Hence the data to be transferred is written by the Teradata FastExport via the Data Connector module on to the Named pipe.
.EXPORT OUTFILE np1; /* where “np1” is the name of the Named pipe. */
The data can be written on to the Named pipe by using simple “cat” command as mentioned below.
$ cat data_file > np1
You can get the NP access module version information from the log file generated by Data connector module. In order to make Data connector generate log, you need to add ".debug trace io high" statement in your job script(like multiload/fastexport/fastload/tpump scripts). After execution of the script, you can find that Data connector generated log (in the current directory with the file name format 'pm................'), which contains version of Data connector and NPAM modules.