How to use Ldap mechanism in TPT script in Teradata

/* The attribute is (LogonMech = 'ldap') */

/* Below is simple example: tpt.job and variables file, */

/* to run --> tbuild -f tpt.job -v variables.txt */

 

 

/*  variables.txt  */

 SourceTdpId          = 'lnx2019'

,SourceUserName       = 'username'

,SourceUserPassword   = 'password'

,LogonMech            = 'ldap'

,DDLPrivateLogName    = 'ddlprivate.log'

,ExportPrivateLogName = 'exportprivate.log'

,TargetErrorList      = ['3807']

,TargetFileName       = 'flatfile2.dat'

,TargetFormat         = 'delimited'

,TargetTextDelimiter  = ','

,TargetOpenMode       = 'write'

,SelectStmt           = 'SELECT * FROM dbc.dbcinfo;'

 

/*  tpt.job  */

DEFINE JOB qstart2

(

  APPLY TO OPERATOR ($FILE_WRITER)

  SELECT * FROM OPERATOR($EXPORT);

);

 

You can defined the "Logonmech " in the TPT script and you can give a value from the command line through a -u option.

varchar Logonmech='ldap'

Alternatively you can say in TPT script like below:

Logonmech=@mech

 

And then give it a value like:

tbuid -f ... ... -u "mech='ldap'"

 

Comments