This topic describes how to use HoloWeb to create, edit, or delete internal tables. It also describes how to preview table data and view DDL statements.
Prerequisites
You must be logged on to an instance. For more information, see Log on to an instance.
Create an internal table
Log on to the Hologres management console.
In the top navigation bar, select a region.
Click Go to HoloWeb to open the HoloWeb developer page.
-
In the top navigation bar of the HoloWeb development page, click Metadata Management. You can create an internal table in one of the following ways:
-
Method 1: Click Create Table.
-
Method 2: Right-click the target schema or Table under the schema and select Create Internal Table.
-
-
On the Create Internal Table page, configure the parameters.
Category
Parameter
Description
Basic properties
Schema
The name of the schema.
You can select the default public schema or a new schema.
Table name
The name of the internal table.
Description
An optional description of the table.
Field
Field name
The name of the field.
Data type
The type of values that the field can store.
Primary key
The unique identifier for each row of data in the table.
Nullable
Specifies whether the field can contain null values.
Array
An ordered sequence of elements.
Description
An optional description of the field.
Operations
Includes Delete, Up, and Down.
Properties
Storage mode
The valid values are Column-oriented Storage, Row-oriented Storage, and Row-column Storage.
The default value is Column-oriented Storage.
Data lifecycle (in seconds)
The data retention period, in seconds. This period starts when data is first written to the table. After this period expires, the data is deleted at a later time.
The default value is Permanent.
Binlog
Specifies whether to enable Binlog for the table. For more information, see Subscribe to Hologres Binlog.
Binlog lifecycle
The retention period of Binlog data. For more information, see Subscribe to Hologres Binlog. The default value is Permanent.
Distribution key
The distribution_key. For more information, see Distribution Key.
Segment key
The event_time_column. For more information, see Event Time Column (Segment Key).
Clustering key
The clustering_key. For more information, see Clustering Key.
Dictionary encoding columns
The dictionary_encoding_columns. For more information, see Dictionary Encoding.
Bitmap column
The bitmap_columns. For more information, see Bitmap Index.
Partitioned table
Partition field
Select a partition field.
-
In the upper-right corner of the page, click Submit. After you submit the settings, refresh the corresponding schema in the left-side navigation pane to view the new internal table.
You can click Query Table in the upper-right corner of the table editing page to open the SQL query window and run SQL statements.
Edit an internal table
-
In the left-side navigation pane, click Instances Connected to view all connected instances.
-
Under the target instance, click Database to view your databases.
-
Under the target database, expand the Schema folder and click Table to view all internal tables.
-
Right-click the target internal table and select Open Table.
-
In the upper-right corner of the page, click Edit Table.
-
At the bottom of the page, click Add Field to add table fields. You can find the generated SQL statements and view task execution details in the Operational Logs editor.
NoteYou cannot delete existing table fields in Edit Table mode.
-
Click Commit Table to save your changes.
Delete an internal table
-
In the left-side navigation pane, find the target internal table on the Instances Connected tab.
For more information, see Steps 1 to 3 in Edit an internal table.
-
Right-click the target internal table and select Delete Table.
-
Click OK.
Data preview
-
In the left-side navigation pane, find the target internal table on the Instances Connected tab.
For more information, see Steps 1 to 3 in Edit an internal table.
-
Double-click the target internal table and click Data Preview on the table editing page.
The following figure shows a sample data preview. The table displays two columns, cityid and cityname. The cityid column is selected.
DDL statements
-
In the left-side navigation pane, find the target internal table on the Instances Connected tab.
For more information, see Steps 1 to 3 in Edit an internal table.
-
Double-click the target internal table and click DDL Statements on the table editing page.
The following figure shows a sample DDL statement. The DDL Statements tab displays the complete
CREATE TABLEstatement for thepublic.citytable. The table contains thecityid int4andcityname varchar(20)columns. TheCALL SET_TABLE_PROPERTYstatement configures properties such as the storage mode (orientationis set tocolumn), bitmap column (bitmap_columnsis set tocityname), dictionary encoding columns (dictionary_encoding_columnsis set tocityname:auto), data lifecycle (time_to_live_in_secondsis set to3153600000), and storage format (storage_formatis set tosegment).
Related topics
You can also use SQL statements to create, modify, and delete internal tables. For more information, see the following topics: