Importing Data from FLAT FILE to TABLE using TERADATA SQL ASSISTANT is very simple.It is very easy to import data from any flat file to table in TERADATA using TERADATA SQL Assistant. First, you need to write SQL Query in Query Window. INSERT query should be in accordance with the flat file considering the columns mentioned in FLAT FILE in the same order. So if your flat file contains five columns, mention those five columns in the same order in your INSERT CLAUSE; like

INSERT INTO TABLENAME (COL1,COL2,COL3,COL4,COL5) VALUES (?,?,?,?,?);


Go to FILE –> Import Results. Now when you run the query, it will display the browse window and will ask you to select the file to which you want to use to import data.
Points to consider while importing data from table:
a) Delimiter: Whether you want to import FIXED WIDTH or DELIMITED file. If file is delimited then you need to select the delimiter for the input file. To select the appropriate Delimiter for your output file go to TOOLS–>OPTIONS –> EXPORT/IMPORT –> Set the Delimiter.
b) SKIP HEADER:There are other options available, like Ignore First Record (Skip Header) .So check these options also while importing data.
c) Suitable UTILITY:IMPORT via TERADATA SQL Assistant is not preferable if data is too huge in terms of records counts or row length. As it operates at row level, importing huge volume of data may take long time. For such cases, use FASTLOAD or MULTILOAD utility.

Automatically generate Teradata Import Scripts – BTEQ Import, Fastload, Multiload or TPTLoad with this web utility.

11 Comments

  1. Followed steps outlined to load data into a table, upon opening file, saw row count tumbler count and appear to consume all of the data out of the file. when I try to query contents of table, i get No Import Parameters(?,??,?B or ?C) found in query? Obviously, I am missing something. HelpPPP?

    1. Author

      Hi John

      If my guess is correct, you have to deselect File Import option.
      Go to File and deselect the option before running your query.

      Cheers
      Raj

      1. Author

        Additionally you can watch below video :


  2. Hi ,
    Can you explain how to import an excel file with 1000 rows?

  3. I have a problem with Teradata when i want to import a file i have this message :
    teradata the query contains 19 parameters but import file contains 9 data values.
    I press File – import data …
    Could you help me please !!
    Thanks in advance

    1. Author

      Hi Nawfel
      Please go to tools–>options–>export/import and set the proper delimiter to resolve this issue.

      Thanks
      Raj

  4. I have deselected the option of import data but still see error , i get No Import Parameters(?,??,?B or ?C) found in query? I am not able to import data


  5. When I go to File -> Import Data , it should Ideally open up the window to select the Flat File/CSV File but the window is not opening at all. Any idea, what could be the reason? I am able to perform all other operations within TeradataSQL Assistant perfectly. Creating DB/Writing Queries/Executing Queries etc…

    Any quick help on this issue would be appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *