16.10 - Export Job - Access Module

Teradata Tools and Utilities Access Module Reference

prodname
Access Module
vrm_release
16.10
created_date
July 2017
category
Programming Reference
featnum
B035-2425-077K
The parameters inside <> brackets need to be replaced appropriately and <> brackets need to be removed. The Teradata Access Module for Amazon S3 config file and credentials file need to be created and placed at $HOME/.aws.
DEFINE JOB EXPORT_FROM_TERADATA
DESCRIPTION 'Export data from Teradata to Amazon S3'
(
    STEP EXPORT_THE_DATA
    (
        APPLY TO OPERATOR ( $FILE_WRITER()
            ATTR
            (
                AccessModuleName = 'libs3axsmod.so',
                AccessModuleInitStr = 'S3Bucket=<S3BucketName> S3Prefix="<PrefixName>/"
S3Object=testdata.raw S3SinglePartFile=True'
            )
        )
        SELECT * FROM OPERATOR ( $EXPORT
            ATTR
            (
                SelectStmt = 'SELECT * FROM S3W001_src;'
            )
        );
    );
);