When exporting data to a flat file we seeing that decimals with over 18 precision are being returned as zero. MaxDecimalDigits is set to 38 so is there something else we are doing incorrectly here?
Columns 1, 3 and 5 are being exported as zero. So the first column 2687.350 ends up in the flat file as 0.
Using Teradata 15 and TPT 15.
Below are the table create schema and operators.
Create table test.decimaltest2
col3 decimal (19,4),
col4 decimal (18,8),
col5 decimal (38,12));
Insert into test.decimaltest2 values (2687.350,1338.060,1671.470,857.560,1247.960);
DEFINE SCHEMA TDSourceTable (
DEFINE OPERATOR WriteOperator
TYPE DataConnector Consumer
VARCHAR PrivateLogName = 'ConsumerLog'
,VARCHAR FileName = 'C:\exp_decimaltest2.txt'
,VARCHAR Format = 'Delimited'
,VARCHAR IndicatorMode = 'N'
,VARCHAR OpenMode = 'Write'
,VARCHAR FileList = 'N'
,VARCHAR TextDelimiter = '|'
DEFINE OPERATOR ExportOperator
VARCHAR Tdpid = 'tdat'
,VARCHAR UserName = 'user1'
,VARCHAR UserPassword = '<PASSWORD>'
,INTEGER MaxDecimalDigits = 38
,VARCHAR SelectStmt = 'SELECT col1, col2, col3, col4, col5 FROM Test.decimaltest2;'
,VARCHAR PrivateLogName = 'ExportLog'
Thanks again for your help!
This is a known issue and we are currently working on the fix.
Thank you Steve! We're working around this by casting, but it is nice to know that it wasn't something we were doing wrong (which is rare). :P
I am trying to look up when this was fixed.
Since it looks like several people are having issues, I need to know what version of TPT everyone on this thread is running.
Ok, if the "issue" that we fixed is what I think, these are the releases in which the issue was resolved: