DB: Tera data 16.20
Windows 8
Connect to teradata 16.0
Expand server tree, expand Databases tree
Select DB named 'tom' and expand this db , right click on table 'tom.ALLDATATYPES' and select tools-> export
In the export window select all objects from left and right pane( all checkboxes) and click next
Under the Options page , provide folder path and click next
Processing will start, in the results section ,verify if export completes successfully
Exp:
Export should be successful
Actual:
Java exceptions are thrown,also some exceptions contains junk characters
Below is the Aquascript generated
// specify connection var conn = aqua.project.getServerConnection('Teradata 10.90.1.169 v16.20'); conn.connect(); conn.changeDatabase('tom'); function createWriter() { var wr = aqua.io.newTextWriter(); wr.setCellDelimiter(','); wr.setQuoteIdentifier('\"'); wr.setOpenDateQuoteIdentifier('['); wr.setCloseDateQuoteIdentifier(']'); wr.setFirstLineContainsColumnNames(true); wr.setLineDelimiter('\r\n'); wr.setNullString('(null)'); wr.setDefaultDateTimeFormat('yyyy/MM/dd:hh:mm:ss a'); wr.setDefaultDateFormat('yyyy/MM/dd'); wr.setDefaultTimeFormat('hh:mm:ss a'); wr.setDecimalSymbol('.'); return wr; } function exportTable(name, dest, query) { aqua.console.println('Exporting: ' + name + ' ...'); var rs = conn.executeQuery(query); var wr = createWriter(); wr.setFile(dest); wr.write(rs); wr.close(); aqua.console.println('Export completed.'); } function exportView(name, dest, query) { aqua.console.println('Exporting: ' + name + ' ...'); var rs = conn.executeQuery(query); var wr = createWriter(); wr.setFile(dest); wr.write(rs); wr.close(); aqua.console.println('Export completed.'); } // exporting data exportTable('ads_table', 'C:\\Users\\Administrator\\Desktop\\folder\\ads_table.txt', 'SELECT * FROM \"ads_table\"'); exportTable('ALLDATATYPES', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES.txt', 'SELECT * FROM \"ALLDATATYPES\"'); exportTable('ALLDATATYPES_CHARACTERS', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_CHARACTERS.txt', 'SELECT * FROM \"ALLDATATYPES_CHARACTERS\"'); exportTable('ALLDATATYPES_DATATIMES', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_DATATIMES.txt', 'SELECT * FROM \"ALLDATATYPES_DATATIMES\"'); exportTable('ALLDATATYPES_LAR_OBJ', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_LAR_OBJ.txt', 'SELECT * FROM \"ALLDATATYPES_LAR_OBJ\"'); exportTable('ALLDATATYPES_LONG_VARGRAPHICS', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_LONG_VARGRAPHICS.txt', 'SELECT * FROM \"ALLDATATYPES_LONG_VARGRAPHICS\"'); exportTable('ALLDATATYPES_NOT', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_NOT.txt', 'SELECT * FROM \"ALLDATATYPES_NOT\"'); exportTable('ALLDATATYPES_NUMERIC', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_NUMERIC.txt', 'SELECT * FROM \"ALLDATATYPES_NUMERIC\"'); exportTable('ALLDATATYPES_REAMINING', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_REAMINING.txt', 'SELECT * FROM \"ALLDATATYPES_REAMINING\"'); exportTable('avroCompressTable', 'C:\\Users\\Administrator\\Desktop\\folder\\avroCompressTable.txt', 'SELECT * FROM \"avroCompressTable\"'); exportTable('avroCompressTable1', 'C:\\Users\\Administrator\\Desktop\\folder\\avroCompressTable1.txt', 'SELECT * FROM \"avroCompressTable1\"'); exportTable('avroCompressTable2', 'C:\\Users\\Administrator\\Desktop\\folder\\avroCompressTable2.txt', 'SELECT * FROM \"avroCompressTable2\"'); exportTable('avroCompressTable3', 'C:\\Users\\Administrator\\Desktop\\folder\\avroCompressTable3.txt', 'SELECT * FROM \"avroCompressTable3\"'); exportTable('bistudio_example', 'C:\\Users\\Administrator\\Desktop\\folder\\bistudio_example.txt', 'SELECT * FROM \"bistudio_example\"'); exportTable('bistudio_example1', 'C:\\Users\\Administrator\\Desktop\\folder\\bistudio_example1.txt', 'SELECT * FROM \"bistudio_example1\"'); exportTable('gh', 'C:\\Users\\Administrator\\Desktop\\folder\\gh.txt', 'SELECT * FROM \"gh\"'); exportTable('INTERVAL_TIMING', 'C:\\Users\\Administrator\\Desktop\\folder\\INTERVAL_TIMING.txt', 'SELECT * FROM \"INTERVAL_TIMING\"'); exportTable('sample_points1', 'C:\\Users\\Administrator\\Desktop\\folder\\sample_points1.txt', 'SELECT * FROM \"sample_points1\"'); exportTable('sample_points2', 'C:\\Users\\Administrator\\Desktop\\folder\\sample_points2.txt', 'SELECT * FROM \"sample_points2\"'); exportTable('t_blc', 'C:\\Users\\Administrator\\Desktop\\folder\\t_blc.txt', 'SELECT * FROM \"t_blc\"'); exportTable('t_blc1', 'C:\\Users\\Administrator\\Desktop\\folder\\t_blc1.txt', 'SELECT * FROM \"t_blc1\"'); exportTable('t3', 'C:\\Users\\Administrator\\Desktop\\folder\\t3.txt', 'SELECT * FROM \"t3\"'); exportTable('t4', 'C:\\Users\\Administrator\\Desktop\\folder\\t4.txt', 'SELECT * FROM \"t4\"'); exportTable('td_blc', 'C:\\Users\\Administrator\\Desktop\\folder\\td_blc.txt', 'SELECT * FROM \"td_blc\"'); exportTable('TestFluidShell', 'C:\\Users\\Administrator\\Desktop\\folder\\TestFluidShell.txt', 'SELECT * FROM \"TestFluidShell\"'); exportTable('xx', 'C:\\Users\\Administrator\\Desktop\\folder\\xx.txt', 'SELECT * FROM \"xx\"'); exportTable('xxx', 'C:\\Users\\Administrator\\Desktop\\folder\\xxx.txt', 'SELECT * FROM \"xxx\"'); exportView('ALLDATATYPES_V1', 'C:\\Users\\Administrator\\Desktop\\folder\\ALLDATATYPES_V1.txt', 'SELECT * FROM \"ALLDATATYPES_V1\"'); exportView('bistudio_example_view', 'C:\\Users\\Administrator\\Desktop\\folder\\bistudio_example_view.txt', 'SELECT * FROM \"bistudio_example_view\"'); exportView('bistudio_example_view_total', 'C:\\Users\\Administrator\\Desktop\\folder\\bistudio_example_view_total.txt', 'SELECT * FROM \"bistudio_example_view_total\"');
Screens shot is attached for reference
178 KB
Please attach your complete test case with DDL and data.
Thanks Tom
Please also include the text version of the stack track because the image form does not show all details.
Please also include the text version of the stack track because the image form does not show all details.
Hi Shubhang,
This error is present in previous releases of ADS and not a defect as a result of the code changes in ADS 19.5. It is an issue handling long vargraphics as in the table ALLDATATYPES_LONG_VARGRAPHICS. I will leave this issue open but assign it to a later release of ADS to get fixed.
Thanks, Tom
Hi Shubhang,
This error is present in previous releases of ADS and not a defect as a result of the code changes in ADS 19.5. It is an issue handling long vargraphics as in the table ALLDATATYPES_LONG_VARGRAPHICS. I will leave this issue open but assign it to a later release of ADS to get fixed.
Thanks, Tom
Issue: while exporting data from Teradata 16.20. Getting error :
An unknown character string translation was requested.
a. We were able to reproduce this issue not only with export but also with Query Analyzer.
Export Data:
Query Analyzer:
b. This issue boil downs to the Table ALLDATATYPES_LONG_VARGRAPHICS with simple
Select * from ALLDATATYPES_LONG_VARGRAPHICS
c. Table contains following column:
LONG VARGRAPHICS VARCHAR(32000) CASESPECIFIC CHARACTER SET GRAPHIC,
d. The charset of session is - ASCII which is not compatible with above. (We used help session command in BTEQ to find out)
e. The session charset is ASCII. According to Teradata documentation, The error ‘An unknown character string translation was requested’ is thrown when the charset conversion is unknown
https://docs.teradata.com/reader/8MhLDQBmL52OycrEKPuGqg/~5UrynqaHCXMctj1mkkm3w
f. In documentation of 'VARGRAPHICS' in Teradata, there is one rule stating 'VARGRAPHIC reports an error if the session character set is UTF8 or a single-byte character set, such as ASCII'
https://docs.teradata.com/reader/kmuOwjp1zEYg98JsB8fu_A/HBL4hFdg2QEa_w38ya6W9w
Fix:
Issue: while exporting data from Teradata 16.20. Getting error :
An unknown character string translation was requested.
a. We were able to reproduce this issue not only with export but also with Query Analyzer.
Export Data:
Query Analyzer:
b. This issue boil downs to the Table ALLDATATYPES_LONG_VARGRAPHICS with simple
Select * from ALLDATATYPES_LONG_VARGRAPHICS
c. Table contains following column:
LONG VARGRAPHICS VARCHAR(32000) CASESPECIFIC CHARACTER SET GRAPHIC,
d. The charset of session is - ASCII which is not compatible with above. (We used help session command in BTEQ to find out)
e. The session charset is ASCII. According to Teradata documentation, The error ‘An unknown character string translation was requested’ is thrown when the charset conversion is unknown
https://docs.teradata.com/reader/8MhLDQBmL52OycrEKPuGqg/~5UrynqaHCXMctj1mkkm3w
f. In documentation of 'VARGRAPHICS' in Teradata, there is one rule stating 'VARGRAPHIC reports an error if the session character set is UTF8 or a single-byte character set, such as ASCII'
https://docs.teradata.com/reader/kmuOwjp1zEYg98JsB8fu_A/HBL4hFdg2QEa_w38ya6W9w
Fix:
Moving this ticket to verified since no code changes are done.
Moving this ticket to verified since no code changes are done.
Issue #15676 |
Verified |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 63 |
No time estimate |
Please attach your complete test case with DDL and data.
Thanks Tom