Use this procedure to create a new Hadoop table by importing data from an external file.
- In Data Source Explorer right-click Tables on a Hadoop system.
- Select The . Data Transfer Wizard displays.
- In Source Type, select External File (Smart Load).
- Click Launch. The Smart Loader for Hadoop Wizard opens.
- In Input File, type the directory path and name of the file that contains data you want to use to build a table. You can also browse to the file.
- [Optional] Select Column Labels in First Row to specify to use the first row of data as the column labels for the new table. This option is not available for Cloudera systems.
At Column Delimiter, 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
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)
- 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.
- Click Next. The Hadoop Table Properties screen displays.
- In Table Name, type the name of the table to be derived from the loaded data.
In Table File Format, select the format of the data in the table.
Supported table file format types are TEXT (default), SEQUENCE, RC, and ORC. ORC is only available for Hortonworks.
For Cloudera Systems, if RC or SEQUENCE is selected for Table File Format, the wizard requires Hive JDBC Properties.The hive host name field is prepopulated with the impala host name. If the hive host name is different, modify the field to the correct host value.
- To edit the data types of a specific column, click (ellipses) in the column header.
Select one of the following:
Option Description Click Next Previews 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 closes. 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.