A database, built on the computer storage device, is a data warehouse where data is organized, stored, and managed based on its structure.
The table is an important part of the database. It consists of rows and columns. Each column functions as a field. Each value in a field (column) represents a type of data.
The database is a framework and the table contains data content. A database has one or more tables.
You can create databases and tables on the management console or using SQL statements. This section describes how to create a database and a table on the management console.
A view can be created only by using SQL statements. You cannot create a view on the Create Table page.
Parameter |
Description |
---|---|
Database Name |
NOTE:
The default database is a built-in database. You cannot create the default. database. |
Description |
Description of a database. |
Tag |
Tags used to identify cloud resources. A tag includes the tag key and tag value. If you want to use the same tag to identify multiple cloud resources, that is, to select the same tag from the drop-down list box for all services, you are advised to create predefined tags on the Tag Management Service (TMS). NOTE:
|
After a database is created, you can view and select the database for use on the Databases and Tables page or SQL Editor page.
Before creating a table, ensure that a database has been created.
Datasource connection tables, such as View tables, HBase (MRS) tables, OpenTSDB (MRS) tables, GaussDB(DWS) tables, RDS tables, and CSS tables, cannot be created. You can use SQL to create views and datasource connection tables. For details, see sections Creating a View and Creating a Datasource Connection Table in the Data Lake Insight SQL Syntax Reference.
Parameter |
Description |
Example |
---|---|---|
Table Name |
|
table01 |
Data Location |
Data storage location. Currently, DLI and OBS are supported. |
DLI |
Description |
Description of the table. |
- |
Column Type |
Available values: Normal or Partition |
Normal |
Column |
Name of a column in a table. The column name must contain at least one letter and can contain underscores (_). It cannot contain only digits. You can select Normal or Partition. Partition columns are dedicated to partition tables. User data is partitioned to improve query efficiency. NOTE:
The column name is case-insensitive and must be unique. |
name |
Type |
Data type of a column. This parameter corresponds to Column Name.
|
string |
Column Description |
Description of a column. |
- |
Operation |
|
- |
Parameter |
Description |
Example |
---|---|---|
Data Format |
DLI supports the following data formats:
|
CSV |
Storage Path |
Enter or select an OBS path. The path can be a folder or a path. NOTE:
If you need to import data stored in OBS to the OBS table, set this parameter to the path of a folder. If the table creation path is a file, data fails to be imported. |
obs://obs1/sampledata.csv |
Table Header: No/Yes |
This parameter is valid only when Data Format is set to CSV. Whether the data source to be imported contains the table header. Click Advanced Settings and select the check box next to Table Header: No. If the check box is selected, the table header is displayed. If the check box is deselected, no table header is displayed. |
- |
User-defined Delimiter |
This parameter is valid only when Data Format is set to CSV and you select User-defined Delimiter. The following delimiters are supported:
|
Comma (,) |
User-defined Quotation Character |
This parameter is valid only when Data Format is set to CSV and you select User-defined Quotation Character. The following quotation characters are supported:
|
Single quotation mark (') |
User-defined Escape Character |
This parameter is valid only when Data Format is set to CSV and you select User-defined Escape Character. The following escape characters are supported:
|
Backslash (\) |
Date Format |
This parameter is valid only when Data 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 Data 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 |
After a table is created, you can view and select the table for use on the Data Management page or SQL Editor page.