With Client Load and Unload Utilities
On UNIX systems, you can use the Named Pipes Access Module with named pipes. On SPARC systems running Oracle Solaris, you can also use the access module with unnamed pipes that correspond to open file descriptor file system devices (/dev/fd devices).
With Named Pipes
To use the Teradata Named Pipes Access Module on UNIX with named pipes:
1 Use the UNIX mknod command with the p option to create a named pipe. In the following example, /tmp/mypipe is the name of the pipe:
/sbin/mknod /tmp/mypipe p
2 Program the writer process to send its output stream to the named pipe, as in the following FastExport script example:
.EXPORT OUTFILE /tmp/mypipe;
3 Program the reader process to read from the named pipe as in the following FastLoad script example:
axsmod np_axsmod.so “fallback_directory=...”;
define file= /tmp/mypipe;
4 Launch both the writer and the reader processes, as in the following example where flod.cmds is the name of the FastLoad job script file:
fexp <fexp.cmd & fastload <flod.cmds &
In this example, UNIX connects both processes through the named pipe /tmp/mypipe.
With Unnamed Pipes and File Descriptor Devices
To use the Teradata Named Pipes Access Module with unnamed pipes and file descriptor devices:
1 Program the writer process to send its output to a file descriptor device greater than 2 (stderr), such as /dev/fd/4, as in the following FastExport script example:
.EXPORT OUTFILE /dev/fd/4;
2 Program the reader process to read from a file descriptor device greater than 2 (stderr), such as /dev/fd/3, as in the following FastLoad script example:
axsmod np_axsmod.so “fallback_file=...”;
define file= /dev/fd/3...;
3 Plumb the resulting file descriptors together using a shell pipeline, such as:
fexp <fexp.cmds 4>&1 >fexp.out | \
fastload 3<&0 <flod.cmds >flod.log
In this example UNIX diverts the FastExport standard output to the file fexp.out and:
With Teradata Parallel Transporter
To use the Teradata Named Pipes Access Module with Teradata PT on UNIX:
1 Create a named pipe (for example /tmp/mypipe).
2 Create a Teradata PT script that specifies /tmp/mypipe as the filename opened by the module. For example, the script tbuild.txt contains a statement similar to the following, defining the Teradata PT Data Connector Operator:
DEFINE OPERATOR DataConnector ()
TYPE DATACONNECTOR PRODUCER
OUTPUT SCHEMA Tab3schema
ATTRIBUTES
(
VARCHAR FileName = '/tmp/mypipe',
VARCHAR PrivateLogName = 'DcImport.log',
VARCHAR AccessModuleName = 'np_axsmod.so',
VARCHAR AccessModuleInitStr = 'ld=. fd=.',
VARCHAR IndicatorMode = 'N',
VARCHAR OpenMode = 'Read',
VARCHAR Format = 'Formatted'
);
The following attributes are relevant to the Named Pipes Access Module:
All other Teradata PT Data Connector Operator attributes are transparent to the access module.
3 Code an Export Operator script named fexp.coms containing a statement similar to the following:
.EXPORT OUTFILE /tmp/mypipe ;
4 Launch Export Operator and Teradata Parallel Transporter with shell commands similar to the following:
fexp < fexp.cmds > fexp.out & tbuild -f tbuild.txt &
In this example, UNIX connects both processes through the named pipe /tmp/mypipe.
The Load operator can direct the access module to save a checkpoint in case the job must be restarted.