Adding and Configuring Tables
All available tables are displayed on the Data Model tab. The table name must be unique within the workspace.
To create a new table, click Add table and then Create.
Importing a Table
To import a table from your computer, select Import. The file must contain a header. There must be no empty lines at the end of the file.
When uploading a table, specify the following:
- Separator (
;— semicolon,,— comma,|— vertical bar,/— forward slash, tab, space, or other) - Qualifier (
'— single quotes or"— double quotes) - Encoding (UTF-8, UTF-8 BOM, or Windows-1251)
- You cannot upload multiple files at once.
- You cannot upload an empty file as a table. The file must contain at least one column.
- Values in square brackets
[]are not recognized as arrays during import. To treat a column as an array, manually specify the type: Array(String).
Creating a New Table
When creating a new table, a dialog box opens where you can specify:
- Table name
- Column names and data types
- Partitioning
- Sorting
Table creation is available only if the following conditions are met:
- A table name is specified
- The table contains at least one column with both a name and a data type defined
For more information about data types, see Editing a Script.
To reorder columns while creating a table, hover over the move icon, click and hold, then drag the column to the desired position.
Connecting a Table from Storage
Tables are connected to a workspace from a ClickHouse database whose server has been added in the Data Storages section. To add a table, click Connect. If tables exist in ClickHouse, a dialog box with their list appears. You cannot reconnect tables that are already connected to the workspace.
Select the desired table and, in the preview mode, click Connect.
Uploaded and created tables are added to ClickHouse and can also be disconnected and reconnected.
Viewing a Table
To view a table’s contents, click the table. A console opens at the bottom.
For convenience, you can resize the console by dragging its top border. To hide the console, click the close icon.
Storing System Tables
System tables are stored in the built-in file-based database. If you need to work with system tables, you can load them into ClickHouse using the Get system table script block. Other methods for working with system tables are not supported.
Working with Tables
To open a table’s context menu, click the three-dot icon. The following actions are available:
- Export in the following formats (encoded in UTF-8):
- .csv
- .xls
- .xlsx
- Replace
- Disconnect
- Delete
When exporting a table to .csv, the first 200 million rows are exported. When exporting to .xls or .xlsx, the first one million rows are exported.
These actions are also available in the console that opens when you click a table.
In addition to export, replace, disconnect, and delete, you can edit table settings. To do so, click the pencil icon.
In the side panel that opens, you can:
- Change the table name
- Edit existing columns
- Add new columns using the + Add column button
To save your changes, click Save.
To modify a specific column, follow these steps:
- Click the three-dot icon next to the column name.
- In the context menu, click Edit.
- Make the necessary changes. You can:
- Change the name
- Change the data type
- Toggle the NULLABLE property on or off
- Add a column description
- Save your changes by clicking Save.
If the data type of one column does not match the data type of another during editing, an error message appears and the column reverts to its previous data type.
Creating columns with the Nullable property reduces performance. We recommend limiting the use of this property. For more information, see Known Issues and Limitations.
To delete a column, click the corresponding option in the context menu.
Was the article helpful?