You can upload existing tables in CSV, JSON, or XML format to create new tables in the database.
Click the Upload Table icon.
The upload table wizard is displayed.
On the Upload File page, select the source of the table
The table details automatically appear as preview. Click Preview if the table details do not load automatically. DAS updates the name of the table, names of the columns, and the data types of each column.
- Upload from HDFS: Select this option to upload files from HDFS.
- Upload from Local: Select this option to upload files from your local computer.
On the Select File Format page, specify the following:
- File type: Select the file type from the drop-down list.
- Field Delimiter: This appears if you select CSV as the file format. Enter a delimiter character such as comma (,).
- Escape Character: This appears if you select CSV as the file format. Enter an escape character such as a backlash (\).
- Quote Character: This appears if you select CSV as the file format. Enter a double quote character (").
- If the first row is header, click the Is the first row header checkbox.
- If the file contains endlines, click the Contains endlines checkbox.
Click Preview to generate table preview.
The first ten columns are displayed.If you are satisfied with the way your uploaded table looks, click Next.
On the Table Schema page, specify the table name.
Modify the column names, and specify the corresponding data type and size.You can also delete column(s) by clicking the corresponding DELETE button.
- Click the Advanced icon to add a comment for the selected column, and select where you want to partition the table or keep it clustered.
- Click Create.
The Create Table page shows the detailed progress as your table is being created.
- To exit the Upload Table wizard at any stage, and to return back to the Database Explorer page, click Cancel.