tLogRow - Output displaying wrong number of characters

Six Stars

tLogRow - Output displaying wrong number of characters

I have a CHAR(6) Account ID field that I am populating via a tDBRow component.  At the end of my process, I want to see the output of the field via a tLogRow component.  However, I am only getting the first character in that field, i.e. if I have Acct 123456, it displays 1 as output and leaves out the rest.  Any idea on where my mistake is?  


Accepted Solutions
Six Stars

Re: tLogRow - Output displaying wrong number of characters

You brought up a good point.  It seems as though the data type was the issue.  I changed it to String in the schema and synced up the columns and I got all the value now instead of only the first character.  Thanks for your continued help, it's nice to see an active forum that helps.


All Replies
Moderator

Re: tLogRow - Output displaying wrong number of characters

Hello,

Have you ever defined field length for your column in schema setting?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: tLogRow - Output displaying wrong number of characters

Yes, I have set the length in schema and synced it across the job.  No matter how long I put the field length, I always get the first character only.

Nine Stars

Re: tLogRow - Output displaying wrong number of characters

Could you show us your job layout along with the schema information details
Six Stars

Re: tLogRow - Output displaying wrong number of characters

tDBRow_6 = creates volatile table in teradata

"CREATE VOLATILE TABLE ACCTS
(
ACCT_ID CHAR(6)
,EFF_DT DATE
,FROM_DT DATE
,THRU_DT DATE
)
UNIQUE PRIMARY INDEX (ACCT_ID) ON COMMIT PRESERVE ROWS"

 

 

tDBRow_2 = inserts records in volatile table

"BEGIN TRANSACTION;
INSERT INTO ACCTS (ACCT_ID, EFF_DT) VALUES ('203544', '2018-10-01');
INSERT INTO ACCTS (ACCT_ID, EFF_DT) VALUES ('325412', '2018-10-01');
UPDATE ACCTS SET FROM_DT = EFF_DT - interval '19' month, THRU_DT = EFF_DT - interval '5' month;
END TRANSACTION;"

 

 

Attached is the schema, job layout and the output from tLogRow_1.

Nine Stars

Re: tLogRow - Output displaying wrong number of characters

Just curious, shouldn't be your tDBCommit_6 be after your tDBRow_2.

Also, how does your tLogRow_1 schema looks have you synced the columns correctly.

Six Stars

Re: tLogRow - Output displaying wrong number of characters

You'd think right?  But I have tried to put the commit after tDBRow_2 but Teradata gives me an error that says:

 

[Teradata Database] [TeraJDBC 16.20.00.06] [Error 3932] [SQLState 25000] Only an ET or null statement is legal after a DDL Statement.Exception in component tDBInput_1 (test)

 

Only after putting a commit after the table creation and then inserting values did it work.  

 

I did sync the scheme in tLogRow_1, attached is the screenshot. 

 

 

Nine Stars

Re: tLogRow - Output displaying wrong number of characters

I am no expert in TeraData but from Talend perspective looks okay to me, not able to figure what might be the problem.
Your dropdown says CHARACTER is that same like CHAR?
Six Stars

Re: tLogRow - Output displaying wrong number of characters

You brought up a good point.  It seems as though the data type was the issue.  I changed it to String in the schema and synced up the columns and I got all the value now instead of only the first character.  Thanks for your continued help, it's nice to see an active forum that helps.