Importing External File Data to Teradata Tables - Teradata Studio

Teradata Studio User Guide

Product
Teradata Studio
Release Number
15.11
Published
May 2016
Language
English (United States)
Last Update
2018-05-03
dita:mapPath
bpb1467322243715.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2041
lifecycle
previous
Product Category
Teradata Tools and Utilities

The following instructions assume that you have the Data Transfer perspective open.

  1. Open the Data Source Explorer and navigate to a Tables node in a Teradata database.
  2. Right-click the Tables folder and select Teradata > Data Transfer.
  3. In the Data Transfer Wizard, select External File (SmartLoad) as the Source Type.
  4. Click Launch.
  5. In the Smart Load Wizard, type the directory path and name of the file that contains data you want to import. To find a file in your file system, click Browse, select the file, and click Open.
  6. Select one of the following options in File Type:
    Option Description
    Delimited Text Text file that uses delimiters to separate data; such as, commas or semicolons in a TXT or CSV file.
    Excel (.xlsx) Microsoft Excel file with .xlsx file extension.
    Excel 87-2003 (.xls) Microsoft Excel file with .xls file extension.
  7. [Optional] Select the Column Labels in First Row check box to specify to use the first row of data as the column labels for the new table.
  8. [Optional] In Drop Table if Max Error(s) Occur, type the maximum number of errors that a table can have before it is dropped from the import operation.
  9. [Optional] If you selected Delimited Text, select the Quick Scan check box to scan the file partially when trying to derive a table from the imported data. This option is only available for delimited text files, such as TXT and CSV files.
  10. If you selected Delimited Text, use the list in Column Delimiter to select the delimiter that is used to separate data in the input file.
    Option Description
    Comma Input file data is separated by commas (,)
    Semicolon Input file data is separated by semicolons (;)
    Space Input file data is separated by blank spaces
    Tab Input file data is separated by Tabs
    Fixed Width Input file data has fixed width columns. Specify in the Fixed Width Columns field a numeric value for the fixed column width.
    I Vertical bar (I) is used to separate data
  11. If you selected Delimited Text, select the Character String Delimiter to use to distinguish string text. The options are " (double-quotes), ' (single quote), or None.
  12. If you selected Delimited Text, in Line Separator select one of the following options based on the operating system from which the data is imported. This option enables you to import files with only Carriage Returns (CR), only LIneFeeds (LF), or both Carriage Returns and LineFeeds (CR and LF).
    • Windows OS (CR and LF)
    • Prior to Mac OS X v10.0 (CR)
    • Unix, Linux, Mac OS X v10.0 and above (LF)
  13. If you selected Delimited Text, in File Encoding select the character set to use to encode the data. The options are: UTF-8, utf-16, ISO-8859-1, UTF-16BE, UTF-16LE, US-ASCB, Cp1252.
  14. If you selected Excel, in Import Worksheet, select the name of a worksheet in the external file to import only that worksheet.
  15. Click Next. The Table Column Data Types screen displays.
  16. In Table Name, type the name of the table to be derived from the loaded data.
  17. In Primary Index, select one of the following options:
    Option Description
    No Primary Index Select if no primary index is to be created for the table. The Teradata primary index is used to evenly distribute data among AMPs.
    Not Unique Select if the Teradata primary index for the table is to be of the type NON-UNIQUE. A non-unique primary index permits the insertion of duplicate field values.
    Unique Select if the Teradata primary index for the table is to be of the type UNIQUE. A unique index must have a unique value in the corresponding fields of every row.
  18. In Table Type, select whether the table is MULTISET or SET.
  19. To edit the data types of a specific column, click (ellipses) in the column header. For information about editing columns for a Teradata database, see Editing Teradata Column Data Types.
  20. Choose one of the following options:
    Option Description
    Click Next Enables you to preview the SQL/DDL code that creates the new table. You can edit the SQL statements in the Generated SQL text area by clicking Show in Editor. If you choose to open the SQL Editor, the Smart Load Wizard will close. You can run the SQL query statements from the SQL Editor to create the table.
    Click Finish Creates the table and imports the data from the file.