Database: Teradata-14.0
ADS version :ADS-windows-x64-15.0.0-dev-369
Connect Teradata-14.0
//Create table
CREATE SET TABLE test_datetime_datatype ,
NO FALLBACK,
LOG,
NO BEFORE JOURNAL,
WITH JOURNAL TABLE = sqlscript."journals",
CHECKSUM = DEFAULT (
test_time TIME(6),
test_date DATE,
test_timestamp TIMESTAMP(6),
test_interval INTERVAL YEAR(2) TO MONTH
)
GO
COMMENT ON TABLE test_datetime_datatype IS 'Table comment on datetime datype'
GO
COMMENT ON COLUMN test_datetime_datatype.test_time IS 'comment on time'
GO
COMMENT ON COLUMN test_datetime_datatype.test_date IS 'comment on date'
GO
COMMENT ON COLUMN test_datetime_datatype.test_timestamp IS 'comment on timestamp'
GO
COMMENT ON COLUMN test_datetime_datatype.test_interval IS 'comment on interval'
GO
//Insert Script
INSERT INTO test_datetime_datatype(test_time, test_date, test_timestamp, test_interval)
VALUES('18:08:09', '2014-07-08', '2014-07-08 18:08:09', '4-11')
GO
INSERT INTO test_datetime_datatype(test_time, test_date, test_timestamp, test_interval)
VALUES('15:08:09', '2012-07-08', '2011-07-08 19:08:09', '2-10')
GO
INSERT INTO test_datetime_datatype(test_time, test_date, test_timestamp, test_interval)
VALUES('16:08:09', '2011-07-08', '2010-07-08 07:08:09', '3-09')
GO
Go to table tree node->Right click this "test_datetime_datatype"
Tools->Select Export data option
check table from objects
check 'test_datetime_datatype' table from object type.click on next button.
Enter file "datetime_datatype.csv" name,click on next button.
Export file successfully.
Created a txt file
'test_time','test_date','test_timestamp','test_interval'
'06:08:09 PM','7/8/14','7/8/14 6:08 PM', 4-11
'03:08:09 PM','7/8/12','7/8/11 7:08 PM', 2-10
'04:08:09 PM','7/8/11','7/8/10 7:08 AM', 3-09
Go to table tree node->Right click this "test_datetime_datatype"
Tools->Select import data option
Browse File "datetime_datatype.csv" file and click on select button.
Click on next button
Go to Trasaction tab
Click on Generate Aqua Script button.
Generate Aqua Script window opens
Enter file name
Enter folder name
Click on Ok button
Import Aqua script generated
Click on Run button.
It will give the "Import started...Error on line 51: Wrapped java.lang.Exception: exception: AQTableWriter currently can not modify [TERADATA].[INTERVAL] data types. (#51)"
NOTE:Aqua Data Studio and this now works fine in the Import Tool visual editor.