15.10 - Starting an Access Module Export Job Without Teradata OleLoad - Access Module

Teradata Tools and Utilities Access Module Reference

prodname
Access Module
vrm_release
15.10
category
Programming Reference
featnum
B035-2425-035K

Starting an Access Module Export Job Without Teradata OleLoad

To successfully export data using the Teradata OLE DB Access Module without the Teradata OleLoad GUI (that is, using a Teradata utility), a job script must reference a previously saved access module job that designated Teradata Database as the data source in the Select a source field of the OleLoad GUI.

Depending on the information designated in the job script, one of the following occurs:

  • If batch or noprompt are specified in the access module initialization string, the Teradata OLE DB Access Module processes the job without interruption.
  • If batch or noprompt are not specified in the access module initialization string, the Teradata OLE DB Access Module dialog box opens, and displays information from the specified .amj file as default job parameters. Modify the job parameters as needed, then click Launch to run the job.
  • Using BTEQ

    To export from Teradata Database using BTEQ

    1 Select Start > Programs > Teradata Client > BTEQ to open Teradata BTEQ from the Windows desktop.

    2 For the EXPORT command, specify OLEDB_AXSMOD as the DLL for the Teradata OLE DB Access Module.

    3 For the FILE parameter and operating specification, use one of the following, where an .amj file is a previously saved access module job:

     

    FILE Parameter

    Operating
    Specification

    Outcome

    "<pathname>.amj"

    'noprompt'

    Script runs if no errors exist. If errors exist, the script fails.

    "<pathname>.amj"

    '<blank>'

    The Teradata OLE DB AXSMOD dialog box opens so you can run the script using the access module.

    "UNTITLED"

    'noprompt'

    Script fails. Instead, specify an .amj file name instead of UNTITLED.

    "UNTITLED"

    '<blank>'

    The Teradata OLE DB AXSMOD dialog box opens.

    BTEQ Export Example

    .LOGON bubbater/dbc,dbc ;
    database bubba ;
    .EXPORT indicdata file="C:\fexp.amj" AXSMOD OLEDB_AXSMOD 'noprompt'; 
    SELECT col1, col2 from tst10k ;
    .EXPORT reset
    .LOGOFF;

    Using FastExport

    To export from Teradata Database using FastExport

    1 Select Start > Programs > Teradata Client > FastExport to open Teradata FastExport from the Windows desktop.

    2 For the EXPORT command, specify OLEDB_AXSMOD as the DLL for the Teradata OLE DB Access Module.

    3 For the .EXPORT OUTFILE and operating specification, use one of the following, where an .amj file is a previously saved access module job:

     

    FILE Parameter

    Operating
    Specification

    Outcome

    "<pathname>.amj"

    'noprompt'

    Script runs if no errors exist. If errors exist, the script fails.

    "<pathname>.amj"

    '<blank>'

    The Teradata OLE DB AXSMOD dialog box opens so you can run the script using the access module.

    "UNTITLED"

    'noprompt'

    Script fails. Instead, specify an .amj file name instead of UNTITLED.

    "UNTITLED"

    '<blank>'

    The Teradata OLE DB AXSMOD dialog box opens.

    FastExport Example

    .LOGTABLE job_account_Log;
    LOGON perform/test,test ;
    DATABASE test2 ;
    .BEGIN EXPORT SESSIONS 4 ;
    SELECT name, salary FROM job_account ;
    .EXPORT OUTFILE "Untitled" AXSMOD Oledb_Axsmod 'noprompt';
    .END EXPORT ;
    .LOGOFF ;

    Using Teradata PT

    To export data from Teradata Database using Teradata PT, ensure that the Teradata PT job script uses the following specifications:

  • TYPE definition as DATACONNECTOR CONSUMER
  • The AccessModuleName attribute set as OLEDB_AXSMOD
  • The FileName attribute set to the pathname of the .amj file
  • For information about exporting data from Teradata Database using Teradata PT, see “Extracting Data” in the Teradata Parallel Transporter User Guide (B035‑2445).