0

I need to import small csv files (less than 500 records) into Teradata tables. For normal csv, it works fine, however when the records contain commas or new lines characters, it needs to be enclosed by quotes. Bteq then interprets those as seperate fields/records. How can I specify the QUOTE OPTIONAL '"' in bteq as we can in fastload.

.LOGON ip/usr,pass;
.IMPORT vartext ',' file = 'issue.csv'; <---- Adding Quote optional '"' gives error
.REPEAT *
using projectId (varchar(5000)) , comment_ (varchar(5000)) 
INSERT INTO db.tbl ("projectId","comment_") values (:projectId,:comment_ );
.LOGOFF
.QUIT

Any suggestions?

orak
  • 2,399
  • 7
  • 29
  • 55
  • BTEQ does not support quoting. Consider using TPT; Data Connector operator supports optional quoting and you can use SQL Inserter operator for small volume. – Fred Mar 15 '23 at 16:25

0 Answers0