TPT EXPORT OPERATOR job structure

Tools & Utilities
Enthusiast

TPT EXPORT OPERATOR job structure

Hi guys, can you help me with a basic structure for a TPT EXPORT operator job?

I have good examples on LOAD operator but I'm not sure what to change ar what's needed.

This would be a load operator generic structure:

DEFINE JOB JOB_NAME

 (

       DEFINE OPERATOR LOAD_OPERATOR

       TYPE LOAD

       SCHEMA *

       ATTRIBUTES

       (

               VARCHAR UserName,

               VARCHAR UserPassword,

               VARCHAR LogTable,

               VARCHAR TargetTable,

               INTEGER BufferSize,

               INTEGER ErrorLimit,

               INTEGER MaxSessions = 20,

               INTEGER MinSessions,

               INTEGER TenacityHours,

               INTEGER TenacitySleep,

               VARCHAR AccountID,

               VARCHAR AmpCheck,

               VARCHAR DeleteTask,

               VARCHAR ErrorTable1,

               VARCHAR ErrorTable2,

               VARCHAR NotifyExit,

               VARCHAR NotifyExitIsDLL,

               VARCHAR NotifyLevel,

               VARCHAR NotifyMethod,

               VARCHAR NotifyString,

               VARCHAR PauseAcq,

               VARCHAR PrivateLogName,

               VARCHAR TdpId,

               VARCHAR TraceLevel,

               VARCHAR WorkingDatabase,

               VARCHAR WorkTable

        );

        DEFINE SCHEMA SCHEMA_NAME

        (

       FIELD1 TYPE,

       FIELD2 TYPE,

       FIELD3 TYPE

        );

        DEFINE OPERATOR READ_OPERATOR

        TYPE DATACONNECTOR PRODUCER

        SCHEMA SCHEMA_NAME

        ATTRIBUTES

        (

              VARCHAR FileName,

              VARCHAR Format,

              VARCHAR OpenMode,

              INTEGER BlockSize,

              INTEGER BufferSize,

              INTEGER RetentionPeriod,

              INTEGER RowsPerInstance,

              INTEGER SecondarySpace,

              INTEGER UnitCount,

              INTEGER VolumeCount,

              VARCHAR AccessModuleName,

              VARCHAR AccessModuleInitStr,

              VARCHAR ArchiveDirectoryPath,

              VARCHAR DirectoryPath,

              VARCHAR ExpirationDate,

              VARCHAR IndicatorMode,

              VARCHAR PrimarySpace,

              VARCHAR PrivateLogName,

              VARCHAR RecordFormat,

              VARCHAR RecordLength,

              VARCHAR SpaceUnit,

              VARCHAR TextDelimiter,

              VARCHAR VolSerNumber,

              VARCHAR UnitType,

              VARCHAR RowErrFileName

        );

        STEP Load_Records (

        APPLY

        (

          'INSERT INTO TABLE_NAME (

                                FIELD1,

                                FIELD2,

                                FIELD3

            )

        VALUES  (

                                :FIELD1,

                                :FIELD2,

                                :FIELD3

                                 );'

       )

       TO OPERATOR

       (

           LOAD_OPERATOR[1]

           ATTRIBUTES

           (

              UserName =USER_NAME

              UserPassword =PASSWD

              LogTable =LOGTABLE_NAME

              TargetTable =TARGET_TABLE_NAME

              WorkingDatabase =DB_SCHEMA_NAME

              TdpId =ID (?)

           )

       )

       SELECT * FROM OPERATOR

       (

          READ_OPERATOR[1]

          ATTRIBUTES

          (

             FileName =FILE_NAME

             Format ='DELIMITED',

             OpenMode ='Read',

             DirectoryPath =PATH1

             ArchiveDirectoryPath =PATH2

             RowErrFileName=FILE_NAME

             IndicatorMode ='N',

             TextDelimiter ='~'

          )

      );

      );

);

So, how would the export one be?

thanks in advance,



5 REPLIES
Teradata Employee

Re: TPT EXPORT OPERATOR job structure

Our documentation describes the Export operator, the mandatory attributes and the optional ones.

Our User Guide has examples of Export operator job scripts as well.

We also ship sample scripts with the product. Just look in the "samples" directory under the TPT root install directory.

What type of scenario are you looking for?

What version of TPT are you using?

-- SteveF
Enthusiast

Re: TPT EXPORT OPERATOR job structure

hi feinholz, yes I've been looking both the tpt user guide and the tpt reference manual, didn't find full examples.

I was hoping for a minimal or standard query-to-file structure, I can't tell from the load one how to change it. At the moment I'm trying to adapt the load one.

That samples dir could be it, I'm going to check-

thanks!

Enthusiast

Re: TPT EXPORT OPERATOR job structure

I'm looking at these paths but no tpl file samples to be found,

./client/13.10/sample

./client/13.10/odbc_32/samples

./client/13.10/odbc_64/samples

./client/13.10/tbuild/sample

./client/13.10/tbuild/tptapi/sample

./client/13.10/tbuild/tptapi/sample/dynlnk_sample

Junior Contributor

Re: TPT EXPORT OPERATOR job structure

http://www.info.teradata.com/HTMLPubs/DB_TTU_13_10/index.html#page/Load_and_Unload_Utilities/B035_24...

I don't know if the location changed, but the sample directory is usually found at /opt/teradata/client/xx.xx/tbuild/samples/userguide

Btw, TTU 13.10 is a very outdated and no longer supported release.

Enthusiast

Re: TPT EXPORT OPERATOR job structure