Creating table
You can generate, configure, and run DDL from the Data manager page by using the web console.
-
Log in to IBM® watsonx.data console.
-
From the navigation menu, select Data manager.
-
Select the engine from the Engine menu. Catalogs that are associated with the selected engine are listed.
-
There are two ways to import a file into a table. Select the required option.
Option 1: To import file to any available schema under a catalog, do the following steps:
- Click Create drop-down.
- Click Create table from file. The Create table from file page opens.
- Go to step 5.
Option 2: To import file to a particular schema under the catalog, do the following steps:
- Select a schema under a catalog where you want to import a file to create table.
- Click the overflow menu of the selected schema and select Create table from file. The Create table from file page opens.
- Go to step 5.
-
In the Create table from file form, drag a file to the box or click to upload.
.CSV, .Parquet, .JSON, .TXT are the supported data file formats. Creating a table from a file is only supported by iceberg catalogs. The default file format for Iceberg is Parquet. For JSON file, you must enclose the content in [].
You can apply the configuration for Encoding, Escape character, Field delimiter, and Line delimiter prior to uploading any .CSV and .TXT files. Default values are as follows: Encoding value:
UTF-8
, Escape character:\\
, Field delimiter:,
, Line delimiter:\n
-
Click the data type and choose the required data types for each column. Click Next.
-
In the Target form, select the Catalog, and Schema in which the table is created.
-
Enter a name for the table in the Table name field, select Table format, Date format, and click Next. Do not use special character such as question mark (?) or asterisk (*) in table or column name.
-
Verify the details in the Summary page and scroll down to view the DDL preview.
-
Click Create.
-
Verify that the table creation status in the Result set is successful, indicated as true.
-
Go to the Data manager page and select the schema under which you created the table and click the refresh icon. The newly created table is listed.