TPT script : Syntax Error: literal string (DBS UserName value) expected.

Tools & Utilities
Enthusiast

TPT script : Syntax Error: literal string (DBS UserName value) expected.

Hello,

 

I'm trying to load a txt file in a table with a script but when i push it throught cmd i have this message :Capture.PNG

I can't manage to connect the script with teradata. Here's my script :

 

/* 1 */  
/* 2 */  
/* 3 */  DEFINE JOB test
/* 4 */  (
/* 5 */  	DEFINE OPERATOR W_1_o_test
/* 6 */  	TYPE LOAD
/* 7 */  	SCHEMA *
/* 8 */  	ATTRIBUTES
/* 9 */  	(
/* 10 */  		VARCHAR UserName, 
/* 11 */  		VARCHAR UserPassword, 
/* 12 */  		VARCHAR LogTable, 
/* 13 */  		VARCHAR TargetTable, 
/* 14 */  		INTEGER BufferSize, 
/* 15 */  		INTEGER ErrorLimit, 
/* 16 */  		INTEGER MaxSessions, 
/* 17 */  		INTEGER MinSessions, 
/* 18 */  		INTEGER TenacityHours, 
/* 19 */  		INTEGER TenacitySleep, 
/* 20 */  		VARCHAR AccountID, 
/* 21 */  		VARCHAR DateForm, 
/* 22 */  		VARCHAR ErrorTable1, 
/* 23 */  		VARCHAR ErrorTable2, 
/* 24 */  		VARCHAR NotifyExit, 
/* 25 */  		VARCHAR NotifyExitIsDLL, 
/* 26 */  		VARCHAR NotifyLevel, 
/* 27 */  		VARCHAR NotifyMethod, 
/* 28 */  		VARCHAR NotifyString, 
/* 29 */  		VARCHAR PauseAcq, 
/* 30 */  		VARCHAR PrivateLogName, 
/* 31 */  		VARCHAR TdpId, 
/* 32 */  		VARCHAR TraceLevel, 
/* 33 */  		VARCHAR WorkingDatabase
/* 34 */  	);
/* 35 */  
/* 36 */  	DEFINE SCHEMA W_0_s_test
/* 37 */  	(
/* 38 */  		JS VARCHAR(25)
/* 39 */  	);
/* 40 */  
/* 41 */  	DEFINE OPERATOR W_0_o_test
/* 42 */  	TYPE DATACONNECTOR PRODUCER
/* 43 */  	SCHEMA W_0_s_test
/* 44 */  	ATTRIBUTES
/* 45 */  	(
/* 46 */  		VARCHAR FileName, 
/* 47 */  		VARCHAR Format, 
/* 48 */  		VARCHAR OpenMode, 
/* 49 */  		INTEGER BlockSize, 
/* 50 */  		INTEGER BufferSize, 
/* 51 */  		INTEGER RetentionPeriod, 
/* 52 */  		INTEGER RowsPerInstance, 
/* 53 */  		INTEGER SecondarySpace, 
/* 54 */  		INTEGER UnitCount, 
/* 55 */  		INTEGER VigilElapsedTime, 
/* 56 */  		INTEGER VigilWaitTime, 
/* 57 */  		INTEGER VolumeCount, 
/* 58 */  		VARCHAR AccessModuleName, 
/* 59 */  		VARCHAR AccessModuleInitStr, 
/* 60 */  		VARCHAR DirectoryPath, 
/* 61 */  		VARCHAR ExpirationDate, 
/* 62 */  		VARCHAR IndicatorMode, 
/* 63 */  		VARCHAR PrimarySpace, 
/* 64 */  		VARCHAR PrivateLogName, 
/* 65 */  		VARCHAR RecordFormat, 
/* 66 */  		VARCHAR RecordLength, 
/* 67 */  		VARCHAR SpaceUnit, 
/* 68 */  		VARCHAR TextDelimiter, 
/* 69 */  		VARCHAR VigilNoticeFileName, 
/* 70 */  		VARCHAR VigilStartTime, 
/* 71 */  		VARCHAR VigilStopTime, 
/* 72 */  		VARCHAR VolSerNumber, 
/* 73 */  		VARCHAR UnitType
/* 74 */  	);
/* 75 */  
/* 76 */  	APPLY
/* 77 */  		(
/* 78 */  			'INSERT INTO DB_FTG_SRS_DATALAB.jsontest (JS) VALUES (:JS);'
/* 79 */  		)
/* 80 */  	TO OPERATOR
/* 81 */  	(
/* 82 */  		W_1_o_test[1]
/* 83 */  
/* 84 */  		ATTRIBUTES
/* 85 */  		(
/* 86 */  			UserName = L7777777, 
/* 87 */  			UserPassword = xxxxx01!, 
/* 88 */  			LogTable = 'DB_FTG_SRS_DATALAB.jsontest_log', 
/* 89 */  			TargetTable = 'DB_FTG_SRS_DATALAB.jsontest', 
/* 90 */  			TdpId = 'FTGPRDTD'
/* 91 */  		)
/* 92 */  	)
/* 93 */  	SELECT * FROM OPERATOR
/* 94 */  	(
/* 95 */  		W_0_o_test[1]
/* 96 */  
/* 97 */  		ATTRIBUTES
/* 98 */  		(
/* 99 */  			FileName = 'try1.txt', 
/* 100 */  			Format = 'DELIMITED', 
/* 101 */  			OpenMode = 'Read', 
/* 102 */  			DirectoryPath = 'C:\Users\291506\Desktop', 
/* 103 */  			IndicatorMode = 'N', 
/* 104 */  			TextDelimiter = 'TAB'
/* 105 */  		)
/* 106 */  	);
/* 107 */  );

How can i correct this, i'm sure error is at line 86 but i don't know how to solve it...

 

Best regards,

 

 

Kair0


Accepted Solutions
Highlighted
Teradata Employee

Re: TPT script : Syntax Error: literal string (DBS UserName value) expected.

The UserName and UserPassword attribute values are supplied as character strings, so need to be in (single) quotes like the other attributes.

1 ACCEPTED SOLUTION
1 REPLY
Highlighted
Teradata Employee

Re: TPT script : Syntax Error: literal string (DBS UserName value) expected.

The UserName and UserPassword attribute values are supplied as character strings, so need to be in (single) quotes like the other attributes.