Search code examples
sqlcsvimportteradataimport-from-excel

Skip Columns During Teradata Table Import From CSV Using SQL Assistant


I have a CSV file with data I need to import to a Teradata table, but it has a useless column that I would like to exclude from the import. The useless column is the first column, so the CSV rows are set up like:

'UselessData','Data','Data','Data'

Typically, I would import using SQL Assistant by choosing File -> Import Data from the menu and using the basic query:

INSERT INTO TableName VALUES (?,?,?,?)

But this will collect the extraneous useless data in Column 1. Is there a way to specify that an import take only certain columns or send the useless column to NULL?


Solution

  • AFAIK you can't do that with SQL Assistant.

    Possible workarounds:

    • Switch to Teradata Studio or TPT for loading (will also load faster)
    • Load all columns into a Volatile Table first (and don't forget to increase the Maximum Batch size for simple Imports in Tools -> Options -> Import) and then Insert/Select into the target.