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.
If your flat file contains five columns, mention those five columns in the same order in your INSERT CLAUSE.
INSERT INTO TABLENAME (COL1,COL2,COL3,COL4,COL5) VALUES (?,?,?,?,?);
how to import data in teradata sql assistant
Go to FILE –> Import Data. 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.
You can watch below video to see how to import data into Teradata using Teradata SQL Assistant Import Feature.
11 thoughts on “Teradata SQL Assistant Import Data”
Hi is there a way to turn import on and off in my SQL code so i can run this all as one query with multiple statements instead of creating the table then turning on import then running the next part then turning if off then running my select?
Cheers,
Jordon
Hi Jordon
You can write BTEQ script to run import & standard SQL queries in a single script.
Cannot do it in SQL Assistant though.
Best,
Nitin
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.
Hi Megha
You won't get window prompt when you select 'Import Data'. It is only when you run 'prepared' statement you will get the option.
Kindly refer : https://www.youtube.com/watch?v=3pAyKj7GLkQ
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
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
Hi Nawfel
Please go to tools–>options–>export/import and set the proper delimiter to resolve this issue.
Thanks
Raj
Hi ,
Can you explain how to import an excel file with 1000 rows?
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?
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
Additionally you can watch below video :