This section describes how to import data stored in OBS to a table on the DLI console. Data can be imported to both DLI tables (table type: MANAGED) and OBS tables (table type: EXTERNAL).
The data to be imported has been stored on OBS.
on the right of the table and choose Import from the shortcut menu. The Import page is displayed.
Parameter | Description | Example |
|---|---|---|
Databases | Database where the current table is located. | - |
Table Name | Name of the current table. | - |
Queues | Select a queue. | - |
File Format | Format of the data source file to be imported. The CSV, Parquet, ORC, JSON, and Avro formats are supported. Encoding format. Only UTF-8 is supported. | CSV |
Path | You can directly enter a path or click The path can be a file or folder.
| obs://DLI/sampledata.csv |
Table Header: No/Yes | This parameter is valid only when File Format is set to CSV. Whether the data source to be imported contains the table header. Click Advanced Settings and select the checkbox next to Table Header: No. If the checkbox is selected, the table header is displayed. If the checkbox is deselected, no table header is displayed. | - |
User-defined Delimiter | This parameter is valid only when File Format is set to CSV and you select User-defined Delimiter. The following delimiters are supported:
| Default value: comma (,) |
User-defined Quotation Character | This parameter is valid only when File Format is set to CSV and User-defined Quotation Character is selected. The following quotation characters are supported:
| Default value: double quotation marks (") |
User-defined Escape Character | This parameter is valid only when File Format is set to CSV and you select User-defined Escape Character. The following escape characters are supported:
| Default value: backslash (\) |
Date Format | This parameter is valid only when File Format is set to CSV or JSON. This parameter specifies the format of the date in the table and is valid only Advanced Settings is selected. The default value is yyyy-MM-dd. For definition of characters involved in the date pattern, see Table 3 in . | 2000-01-01 |
Timestamp Format | This parameter is valid only when File Format is set to CSV or JSON. This parameter specifies the format of the timestamp in the table and is valid only Advanced Settings is selected. The default value is yyyy-MM-dd HH:mm:ss. For definition of characters involved in the time pattern, see Table 3 in . | 2000-01-01 09:00:00 |
Error Records Path | This parameter is valid only when File Format is set to CSV or JSON. The parameter specifies the error data is stored in the corresponding OBS path and is valid only Advanced Settings is selected. | obs://DLI/ |
Currently, only the first 10 records are displayed.
on the right of a table name and choose View Properties from the shortcut menu. In the displayed dialog box, click Preview to view the imported data.