You can create a table on the DataArts Factory console, in DDL mode, or using a SQL script.
This section describes how to create a table on the DataArts Factory console and in DDL mode.
, expand the data connection to tables, and right-click Create Table or click
to create a table.
, expand the data connection to tables, and right-click Create Table or click
to create a table.CREATE TABLE userinfo ( id INT, name STRING);
The SQL syntax varies depending on the data source. Before developing an SQL statement, learn about the syntax of the data source from its documentation.
. Expand the data connection to the data table level, right-click a table name, and select View Details from the shortcut menu to view the table details shown in Table 4.
Tab Name |
Description |
|---|---|
Table Information |
Displays the basic information and storage information about the table. |
Field Information |
Displays the field information about the table. |
Data Preview |
Displays 10 records in the table. |
DDL |
Displays the DDL of the DLI, DWS or MRS Hive data table. |
. Expand a data connection, right-click a table name, select Delete, and click OK in the displayed dialog box.
Deleted tables cannot be recovered. Exercise caution when performing this operation.
Parameter |
Mandatory |
Description |
|---|---|---|
Basic Property |
||
Table Name |
Yes |
Name of a table. It can contain only letters, digits, and underscores (_). It cannot contain only digits or start with an underscore (_) or a digit. |
Alias |
No |
Alias of the data table. It can contain only letters, digits, and underscores (_). It cannot contain only digits or start with an underscore (_). |
Data Connection Type |
Yes |
Type of the data connection to which the table belongs. The default value is used and cannot be changed. |
Data Connection |
Yes |
Data connection to which the table belongs. The default value is used and cannot be changed. |
Database |
Yes |
Database where the data table is located. The default value is used and cannot be changed. |
Data Location |
Yes |
Location to save data. Possible values:
|
Data Format |
Yes |
Format of data. This parameter is available only when Data Location is set to OBS. Possible values:
|
Path |
Yes |
OBS path where the data is stored. This parameter is available only when Data Location is set to OBS. If no OBS path or OBS bucket is available, the system automatically creates an OBS directory. NOTE:
If the number of OBS buckets has reached the upper limit, the system automatically displays the following message: "Failed to create the OBS directory. Error cause: [Create OBS Bucket failed:TooManyBuckets:You have attempted to create more buckets than allowed]". |
Table Description |
No |
Descriptive information about the table. |
Table Structure |
||
Column Type |
Yes |
Type of the column. Available options include Partition Column and Common Column. The default value is Common Column. |
Column Name |
Yes |
Name of the column. The name must be unique. |
Type |
Yes |
Type of data. |
Column Description |
No |
Descriptive information about the column. |
Operation |
No |
To add a column, click To delete a column, click |
Parameter |
Mandatory |
Description |
|---|---|---|
Basic Property |
||
Table Name |
Yes |
Name of a table. It can contain only letters, digits, and underscores (_). It cannot contain only digits or start with an underscore (_) or a digit. |
Alias |
No |
Alias of the data table. It can contain only letters, digits, and underscores (_). It cannot contain only digits or start with an underscore (_). |
Data Connection Type |
Yes |
Type of the data connection to which the table belongs. The default value is used and cannot be changed. |
Data Connection |
Yes |
Data connection to which the table belongs. The default value is used and cannot be changed. |
Database |
Yes |
Database where the data table is located. The default value is used and cannot be changed. |
Schema |
Yes |
Schema of the database. |
Table Description |
No |
Descriptive information about the table. |
Advanced Settings |
No |
The following advanced options are available:
|
Table Structure |
||
Column Name |
Yes |
Name of the column. The name must be unique. |
Data Classification |
Yes |
Classification of data. Possible values:
|
Data Type |
Yes |
Type of data. |
Column Description |
No |
Descriptive information about the column. |
Create ES Index |
No |
If you click the check box, an ES index needs to be created. When creating the ES index, select the created CSS cluster from the CloudSearch Cluster Name drop-down list. For details about how to create a CSS cluster, see Cloud Search Service User Guide. |
Index Data Type |
No |
Data type of the ES index. The options are as follows:
|
Operation |
No |
To add a column, click To delete a column, click |
Parameter |
Mandatory |
Description |
|---|---|---|
Basic Property |
||
Table Name |
Yes |
Name of a table. It can contain only letters, digits, and underscores (_). It cannot contain only digits or start with an underscore (_) or a digit. |
Alias |
No |
Alias of the data table. It can contain only letters, digits, and underscores (_). It cannot contain only digits or start with an underscore (_). |
Data Connection Type |
Yes |
Type of the data connection to which the table belongs. The default value is used and cannot be changed. |
Data Connection |
Yes |
Data connection to which the table belongs. The default value is used and cannot be changed. |
Database |
Yes |
Database to which the table belongs. The default value is used and cannot be changed. |
Table Description |
No |
Descriptive information about the table. |
Table Structure |
||
Column Name |
Yes |
Name of the column. The name must be unique. |
Data Classification |
Yes |
Classification of data. Possible values:
|
Data Type |
Yes |
Type of data. See LanguageManual DDL. |
Column Description |
No |
Descriptive information about the column. |
Operation |
No |
To add a column, click To delete a column, click |