Skip to content
Snippets Groups Projects
Unverified Commit 9be96be9 authored by Jeff Bruemmer's avatar Jeff Bruemmer Committed by GitHub
Browse files

docs - csv upload replace (#42529)

parent 7f6ba3e3
No related branches found
No related tags found
No related merge requests found
......@@ -4,19 +4,24 @@ title: Uploading data
# Uploading data
Once you've [enabled uploads](#enabling-uploads), you can [upload files](../exploration-and-organization/collections.md#uploading-data) in CSV format to a collection in Metabase.
Once you've [enabled uploads](#setting-up-uploads), you can [upload files](../exploration-and-organization/uploads.md) in CSV format to a collection in Metabase.
![Upload CSV data to a collection in Metabase](./images/upload-to-collection.png)
Uploading CSV data is best suited for ad hoc analysis of spreadsheet data. If you have a lot of data, or will need to update or add to that data regularly, we recommend setting up a way to load that data into a database directly, then connecting Metabase to that database.
## Managing upload settings
To manage upload settings, admins can hit cmd/ctrl + K and search for "Settings - Uploads", or click on the **gear** icon in the upper right and click through **Admin settings** > **Settings** > **Uploads**.
## Databases that support uploads
- [PostgreSQL](../databases/connections/postgresql.md)
- [MySQL](../databases/connections/mysql.md)
- [Redshift](../databases/connections/redshift.md)
- [Clickhouse](../developers-guide/partner-and-community-drivers.md#partner-drivers)
## Enabling uploads
## Setting up uploads
There are a few things admins need to do to support CSV uploads:
......@@ -127,15 +132,23 @@ Offsets:
## Deleting models and tables created by uploads
### Models
### Deleting models created by uploads
{% include plans-blockquote.html feature="Deleting uploaded tables" %}
You can archive a model by clicking on the three dots in the upper right and selecting **Archive**.
For deleting models completely, see [Deleting items permanently](../exploration-and-organization/history.md#deleting-items-permanently).
### Tables
### Deleting tables created by uploads
{% include plans-blockquote.html feature="Deleting uploaded tables" %}
To delete tables created by uploads, go to **Admin settings** > **Settings** > **Uploads**.
Under **Manage uploads**, Metabase will list the tables underlying the models.
You'll need to drop that table in the database itself (not in Metabase). For how to delete tables, see your database's documentation.
When you delete the table, Metabase will give you the option to **Also send all models and questions based on this table to the trash**.
## Note on uploading data to a MySQL database
......
......@@ -85,25 +85,7 @@ You can add events to collections, and organize those events into timelines. See
## Uploading data
You can upload CSV data by clicking on the **Upload** icon in the top right of the collection page.
![Upload CSV data](../databases/images/upload-icon.png).
Metabase will create a [model](../data-modeling/models.md) that contains that CSV data, as well as the model's underlying table.
Uploads will only be available if your admin has set up uploads for your Metabase, and you're in a group with permission to view and query the schema used to store those uploads. See [Uploading data](../databases/uploads.md).
## Appending to a model created by an upload
You can upload additional CSV data to an existing model created by a previous CSV upload.
![Append data to existing upload model](./images/append-data.png)
The uploaded CSV must have the same column name, order, and type as the columns in the model. Metabase will look for a header row to check that the column names are the same. So if you split a large CSV into multiple CSVs, make sure to include header rows for all of the files.
When appending, Metabase will simply insert the rows into the underlying table, which will update the model that sits on top of that table. If you have duplicate rows from one upload to the next, Metabase will preserve those duplicate rows.
The upload icon will only be visible on models created by uploads.
You can upload data to collections. See [Uploading data](./uploads.md)]
## Further reading
......
---
title: Uploading data
---
# Uploading data
If an admin has [set up uploads](../databases/uploads.md), you can upload CSV data by clicking on the **Upload** icon in the top right of the collection page.
![Upload CSV data](../databases/images/upload-icon.png).
## Create, append, or replace models with uploads
When you upload a CSV file, Metabase may ask to select a destination for that upload (depending on whether there are other uploads).
If your CSV has the same columns as a model from a previously uploaded file, you can append data to that model. Otherwise, you can create a new [model](../data-modeling/models.md). if you want to:
- Create a new model
- [Append to an existing model created by an upload](#appending-to-a-model-created-by-an-upload)
- [Replace the data for an existing model created by an upload](#replacing-the-data-of-an-uploaded-model)
Metabase will create a [model](../data-modeling/models.md) that contains that CSV data, as well as the model's underlying table.
Uploads will only be available if your admin has enabled uploads for your Metabase, and you're in a group with Unrestricted access to the schema used to store those uploads. See [Uploading data](../databases/uploads.md).
## Appending to a model created by an upload
You can upload additional CSV data to an existing model created by a previous CSV upload.
![Append data to existing upload model](./images/append-data.png)
The uploaded CSV must have the same column name, order, and type as the columns in the model. Metabase will look for a header row to check that the column names are the same. So if you split a large CSV into multiple CSVs, make sure to include header rows for all of the files.
When appending, Metabase will simply insert the rows into the underlying table, which will update the model that sits on top of that table. If you have duplicate rows from one upload to the next, Metabase will preserve those duplicate rows.
The upload icon will only be visible on models created by uploads.
## Replacing the data of an uploaded model
Instead of deleting a model and recreating it, you can replace the underlying data with an updated spreadsheet.
Like appending to uploaded models, replacing the uploaded CSV data with a new CSV file requires the columns and headings to match.
If you [delete the uploaded table](../databases/uploads.md#deleting-uploaded-tables), you won't be able to replace the model's data.
## Further reading
- [Enabling uploads](../databases/uploads.md)
\ No newline at end of file
......@@ -93,6 +93,7 @@ See how people are using your Metabase.
See which queries are failing to help keep your Metabase tidy.
- [Tracking query errors](../usage-and-performance-tools/tools.md)
- [Deleting uploaded tables](../databases/uploads.md#deleting-tables-created-by-uploads)
## Serialization
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment