How to load data from a csv file into a table using Teradata Studio [closed]

╄→尐↘猪︶ㄣ 提交于 2019-12-11 03:38:45

问题


Hi everybody,

someone here may help me on that? I have to load data from a csv file into a table but I have no idea how.

There are about 12 million records into the csv file.

thanks


回答1:


I have loaded data into Teradata using the IMPORT function available in the TERADATA SQL Assistant.

But handling this amount of data I am not sure whether the method I explain you below will be efficient enough.

However, you may try something like the below:

If you are using TERADATA SQL Assistant:

  1. Goto FILE menu-> click IMPORT option
  2. You should have a table ready with all the required columns in your CSV file and correct datatype.
  3. In SQL Assistant, write the below query:

INSERT INTO TABLE_NAME VALUES(?,?,?,?....);

  1. Once you execute the above query TERADATA will ask for the file from which you want to import the data, you just need to browse and select your file and the import will begin.

P.S: Since you have 12 m records, it will definitely take lot of time.




回答2:


SQL assistant is not the way to load a file with that kind of volume. Either use fload if loading an empty table otherwise use mload.




回答3:


What kind of table are you going to load data? (empty or containing data)

If you are going to load data in a staging table (empty table) then Fastload is the best and quickest method to load data in Teradata.

If table already has data then you can use Multiload (mload) to load data.

If you share your table DDL then it would easier to build Fastload or Multiload script for loading data.



来源:https://stackoverflow.com/questions/31730700/how-to-load-data-from-a-csv-file-into-a-table-using-teradata-studio

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!