# Adding a New Table

## 1. Go to the data model editor

Using the left-hand navigation, go to the data model editor.

![add-new-table-data-model-editor](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-9dfcb1087e63fcdaf10e623b896d85d81827e06b%2Fadd-new-table-data-model-editor.png?alt=media)

## 2. Click the "Add new table" button

Tables can be added by clicking the **"Add new table"** button in the Data Model Editor.

Clicking the button will bring up the Add New Table modal.

![add-new-table-modal](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-fafd9c24d747ccbf9362998d4fdc33ffc2c7934c%2Fadd-new-table-modal.png?alt=media)

## 3. Add a table from data warehouse or upload a CSV

The default tab is "Data Warehouse", which lets you select tables from existing database connections.

Alternatively, file upload is supported for CSVs. Only one table can be selected at a time, and only CSVs can be uploaded. CSV headers must only use alphanumeric characters, spaces, and underscores.

![add-new-table-file-upload](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-22831d411716d37456f75de62d068b767b69f80f%2Fadd-new-table-file-upload.png?alt=media)

## 4. Configure table metadata

After selecting a table or CSV to upload, table metadata like name, column data types, default date, and primary key can be configured.

![add-new-table-preview](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-c4ab67457a7b7c586817ec6c01d48f78cab52489%2Fadd-new-table-preview-data.png?alt=media)

## 5. Associate table with topic

If the table doesn't join to any existing topics in the data model, add it to a new topic.

![add-new-table-add-joins](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-fa7dad23faed43ba06444467f952a53c1e874c04%2Fadd-new-table-new-topic.png?alt=media)

If the table does join to an existing topic, add it to an existing topic. Additional joins can also be set up later.

![add-new-table-add-joins](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-ab3ff0bb17d5d44e6da0dae086a5356763543619%2Fadd-new-table-existing-topic.png?alt=media)

## 6. Add table

After associating the table with a topic, the table is added to the data model.

![add-new-table-success](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-bd0ffffd499d0b8472f958eb8f4c172d4fa8b49a%2Fadd-new-table-success.png?alt=media)
