Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Trash #43049

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Metabase's reference documentation.
- [Basic exploration](./exploration-and-organization/exploration.md)
- [Collections](./exploration-and-organization/collections.md)
- [History](./exploration-and-organization/history.md)
- [Trash](./exploration-and-organization/delete-and-restore.md)
- [Data reference](./exploration-and-organization/data-model-reference.md)
- [Events and timelines](./exploration-and-organization/events-and-timelines.md)
- [X-rays](./exploration-and-organization/x-rays.md)
Expand Down
5 changes: 5 additions & 0 deletions docs/dashboards/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ For [questions](../questions/start.md), dashboards, and [models](../data-modelin

See [History](../exploration-and-organization/history.md).

## Deleting a dashboard

You can move a dashboard to Trash or permanently delete a dashboard that you no longer need.
See [Archiving a dashboard](../exploration-and-organization/delete-and-restore.md).

## Tips on creating helpful dashboards

To make a great dashboard, you first need to decide what you want the dashboard to tell about your data. What questions will give you insight into what you want to know? It helps to think of a topic or theme for your dashboard — something like “customer satisfaction,” or “second quarter sales goals".
Expand Down
8 changes: 7 additions & 1 deletion docs/data-modeling/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,16 @@ You can also use the data reference sidebar to browse the models available. To o

## Model version history

For [questions](../questions/start.md), [dashboards](../dashboards/start.md), and models, Metabase keeps a version history for the previous fifteen versions of that item. You can view changes, revert to previous versions, and archive outdated items.
For [questions](../questions/start.md), [dashboards](../dashboards/start.md), and models, Metabase keeps a version history for the previous fifteen versions of that item. You can view changes and revert to previous versions.

See [History](../exploration-and-organization/history.md).

## Delete a model

You can move outdated or unneeded models to trash, or delete them permanently. Deleting a model will affect questions that use it as a data source.

See [Deleting and restoring items](../exploration-and-organization/delete-and-restore.md#delete-and-restore-items).

## Verifying a model

{% include plans-blockquote.html feature="Model verification" %}
Expand Down
6 changes: 3 additions & 3 deletions docs/databases/uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If you don't want this autogenerated ID column, you can always remove the column

## Data type errors

Metabase will try to guess what the data type is for each column, but if some entries are not like the others, Metabase may not guess the type correctly. For example, if you have a column that starts with integers like 100, 130, 140, then later on a float 105.5, Metabase may reject the upload. To fix this, you'll need to use spreadsheet software to adjust the formatting so that all the integers are formatted as floats (e.g., 100.00, 130.00, 140.00 and so on) before uploading.
Metabase will try to guess what the data type is for each column, but if some entries are not like the others, Metabase may not guess the type correctly. For example, if you have a column that starts with integers like 100, 130, 140, then later on a float 105.5, Metabase may reject the upload. To fix this, you'll need to use spreadsheet software to adjust the formatting so that all the integers are formatted as floats (e.g., 100.00, 130.00, 140.00 and so on) before uploading.

## File size limit

Expand Down Expand Up @@ -136,9 +136,9 @@ Offsets:

{% 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**.
You can move a model to Trash by clicking on the three dots in the upper right and selecting **Move to Trash**.

For deleting models completely, see [Deleting items permanently](../exploration-and-organization/history.md#deleting-items-permanently).
For deleting models completely, see [Deleting items permanently](../exploration-and-organization/delete-and-restore.md).

### Deleting tables created by uploads

Expand Down
2 changes: 1 addition & 1 deletion docs/exploration-and-organization/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To add an Official badge to a collection, an admin can visit the collection and
[Administrators can give you different kinds of access](../permissions/collections.md) to each collection:

- **View access:** you can see the collection and its contents, but you can't modify anything or put anything new into the collection.
- **Curate access:** you can edit, move, or archive the collection and its contents. You can also move or save new things in it and create new collections inside of it, and can also pin items in the collection to the top of the screen. Only administrators can edit permissions for collections, however.
- **Curate access:** you can edit, move, or delete the collection and its contents. You can also move or save new things in it and create new collections inside of it, and can also pin items in the collection to the top of the screen. Only administrators can edit permissions for collections, however.
- **No access:** you can't see the collection or its contents. If you have access to a dashboard, but it contains questions that are saved in a collection you don't have access to, those questions will show a permissions notification instead of the chart or table.

## Your personal collection
Expand Down
122 changes: 122 additions & 0 deletions docs/exploration-and-organization/delete-and-restore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
title: Delete and restore
---

# Delete and restore

Sometimes your questions, dashboards, models, or collections outlive their usefulness. You can send outdated items to **Trash**.

![Move to trash](./images/move-to-trash.png)

Items in **Trash** won't show up in search (unless you use [advanced search filters](./exploration.md)), and you won't be able to use them to create new questions and dashboards.

Moving items to Trash is not permanent: you'll be able to restore them to their original parent collection, or move them to another non-deleted collection. But if you'd' like to delete items permanently, [you can do that too](#permanently-deleting-items).

Deleting an item will affect any [dashboards](../dashboards/introduction.md), [subscriptions](../dashboards/subscriptions.md), or [SQL questions](../questions/native-editor/referencing-saved-questions-in-queries.md) that depend on that item, so be careful!

## See items in Trash

You can find Trash at the bottom of the left navigation sidebar below all the collections:

![Trash](./images/trash.png)

You can think of Trash as a special type of collection. In **Trash**, you can see deleted items from the collections that you have [Curate permissions](../permissions/collections.md#collection-permission-levels) on. You can order deleted items by type (questions, dashboards, etc), time it was deleted, and who deleted it.

You;'ll be able to see the contents of deleted dashboards, questions, and models in Trash, but you won't be able to modify them.

## Search in Trash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section should just link to search section:
You can search for items in the trash https://github.com/metabase/metabase/blob/master/docs/exploration-and-organization/exploration.md#advanced-search


You can use [advanced search](./exploration.md) with a "Search items in trash" toggle to find items in Trash
alexyarosh marked this conversation as resolved.
Show resolved Hide resolved

## Deleting and restoring items

To move an item (question, dashboard, model, or collection) to Trash:
alexyarosh marked this conversation as resolved.
Show resolved Hide resolved

1. Go to the question you want to delete;
alexyarosh marked this conversation as resolved.
Show resolved Hide resolved
2. Click on the three dots menu;
3. Select "Move to trash".

> When a collection is deleted, all items in the collection are deleted as well.

You'll still be able to see the contents of the items in Trash, but you won't be able to modify them or use them as a source for other questions.

To restore an item:

1. Go to Trash;
2. Find the item you'd like to delete. You can sort deleted items to make it easier to find the item, or [search for your question in Trash](#search-in-trash);
3. Click on the checkbox next to the item to select it;
4. Select "Restore".

> Restoring a collection will also restore all the items from that collection.

If the item's original parent collection has been deleted as well, you won't see an option to **Restore**. You'll still be able to move the it from Trash to a different collection.

## How deleting an item affects related items

Deleting or restoring an item will affect other items that depend on that item.

### Questions

alexyarosh marked this conversation as resolved.
Show resolved Hide resolved
| Affected item | In Trash | Permanently deleted | Restored |
| ---------------------------------- | -------------- | ---------------------------------- | -------------- |
| Dashboard | Card removed | Card removed | Card restored |
| Question based on deleted question | Works normally | Breaks with `Card not found` error | Works normally |
| Alerts | Removed | Removed | Not restored |

### Dashboards

| Affected item | In Trash | Permanently deleted | Restored |
| --------------- | -------------------------- | -------------------------- | -------- |
| Subscriptions | Deactivated | Deactivated | Restored |
| Custom homepage | Revert to default homepage | Revert to default homepage | Restored |

### Model

| Affected item | In Trash | Permanently deleted | Restored |
| ---------------------------------- | -------------- | ---------------------------------- | -------------- |
| Question based on deleted question | Works normally | Breaks with `Card not found` error | Reactivated |
| Dashboard | Card removed | Card removed | Card restored |
| Action | Works normally | Deleted | Works normally |

## Collections

| Affected item | In Trash | Permanently deleted | Restored |
| ---------------------------------------------- | -------- | ------------------- | -------- |
| All items and subcollecitons in the collection | In Trash | Permanently deleted | Restored |

## Permanently deleting items

Moving an item to Trash is not permanent: you'll be able to restore it to the original parent collection, or move it to a non-deleted collection.
alexyarosh marked this conversation as resolved.
Show resolved Hide resolved

To permanently delete an item:

1. Go to Trash;
2. Find the item you'd like to delete;
3. Click on the checkbox next to the collection to select it;
4. Select "Permanently delete".
alexyarosh marked this conversation as resolved.
Show resolved Hide resolved

## Deleting and restoring events and timelines

Events and timelines can be archived and unarchived. See [Archiving Events and timelines](events-and-timelines.md#archiving-timelines).

You won't see archived Events and Timelines in Trash. To see archived events and timelines, you need to [access them from the collection's page](events-and-timelines.md#view-archived-events-and-timelines).

## Deleting and restoring SQL snippets

SQL snippets can be archived and unarchived. See [Archiving SQL snippets](../questions/native-editor/sql-snippets.md#archiving-snippets).

You won't see archived SQL snippets in Trash. To see archived SQL Snippets, you need to [access them from the cSnippet menu](../questions/native-editor/sql-snippets.md#snippet-menu).
alexyarosh marked this conversation as resolved.
Show resolved Hide resolved

## Deleting metrics and segments

Metrics and events can be retired. See [Retiring Metrics and Segments](../data-modeling/segments-and-metrics.md#editing-and-retiring-segments-and-metrics).

You won't see retired Metrics and Segments in Trash.

## Deleting subscriptions and alerts

See [Deleting a subscription](../dashboards/subscriptions.md#deleting-a-subscription) and [Deleting alerts](../questions/sharing/alerts.md#editing-and-deleting-alerts).

## Deleting databases

See [Deleting databases](../databases/connecting.md#deleting-databases).
3 changes: 1 addition & 2 deletions docs/exploration-and-organization/events-and-timelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Collections can have timelines, and timelines can contain events. In practice wh
- You can have multiple timelines for the same collection.
- Timelines associated with collections do not apply to that collection's sub-collections.


### Adding events when viewing a collection

When viewing a [collection](collections.md), you can view, add, or edit events by clicking on the **calendar** icon in the upper right.
Expand Down Expand Up @@ -97,7 +96,7 @@ To archive a timeline:

### View archived events and timelines

> Archived events and timelines can only be viewed from the collection. They don't show up in the [main archive](../exploration-and-organization/history.md).
> Archived events and timelines can only be viewed from the collection. They don't show up in the [Trash](../exploration-and-organization/delete-and-restore.md).

To view (and resurrect) archived timelines and events:

Expand Down
76 changes: 1 addition & 75 deletions docs/exploration-and-organization/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,91 +6,17 @@ title: History

For questions, dashboards, and models, Metabase keeps a version history for the previous fifteen versions of that item. You can view changes, and revert to previous versions.

You can also archive, unarchive, and permanently delete outdated items.


## Viewing tracked changes

1. Go to your question, dashboard, or model.
2. Click the info icon.
3. A sidebar will pop up with a history of up to 15 versions.

Metabase will keep track of a version each time you [save](../questions/sharing/answers.md#how-to-save-a-question), [move](../questions/sharing/answers.md#editing-your-question), [revert](#reverting-to-previous-versions), [archive](#archiving-items), or [verify](./exploration.md#verified-items) an item.
Metabase will keep track of a version each time you [save](../questions/sharing/answers.md#how-to-save-a-question), [move](../questions/sharing/answers.md#editing-your-question), [revert](#reverting-to-previous-versions), [move to Trash](./delete-and-restore.md), or [verify](./exploration.md#verified-items) an item.

## Reverting to previous versions

1. Go to your question, dashboard, or model.
2. Click the info icon (an **i** in a circle).
3. A sidebar will appear with up to fifteen previous versions.
4. Click on the **back arrow** beside a version to revert your item to that point in time.

## Archiving items

Sometimes your questions, dashboards, or models outlive their usefulness. You can send outdated items to the **Archive** from the three dot menu `...` of your questions, dashboards, or models.

Note that archiving an item will affect any [dashboards](../dashboards/introduction.md), [subscriptions](../dashboards/subscriptions.md), or [SQL questions](../questions/native-editor/referencing-saved-questions-in-queries.md) that depend on that item, so be careful!

### Archiving multiple items

You can batch archive multiple items from the same collection:

1. Go to the collection.
2. Hover over the icon beside the name of the item.
3. Click the checkbox that appears.
4. When you're done selecting your items, click **Archive** at the bottom of the page.

### Archiving a collection

1. Go to the collection.
2. Click `...` > **Archive**.

Archiving a collection archives all of the collection's contents as well. You can only archive a collection if you have permission to **Curate** a collection (as well as all of the collections inside that collection). If you don't see the **Archive** option, see your Metabase admin about your [collection permissions](../permissions/collections.md).

### Viewing the archive

1. Open the main Metabase sidebar.
2. Click the `...` beside the "Collections" header in the sidebar.
3. Click **View archive**.

To view archived [events and timelines](./events-and-timelines.md), go to the relevant unarchived collection, click on the collection's **Calendar** icon, then the three-dot menu (**...**) and select the option to view the archived events or timelines.

## Unarchiving items

1. Open the main Metabase sidebar.
2. Click the `...` beside the "Collections" header in the sidebar.
3. Click **View archive**.
4. Hover over the item and click the **unarchive** icon (rectangle with a `^` symbol).

The unarchived item should get restored to the parent collection that it was most recently saved in. If you unarchive an item, but you don't know where it's reappeared:

- search for the item directly, or
- check if the item's parent collection is also in the archive.

### Unarchiving multiple items

You can unarchive multiple items at once from the same collection:

1. Go to the collection.
2. Hover over the icon beside the name of the item and click the checkbox that appears.
3. When you're done selecting your items, click **Unarchive** at the bottom of the page.

## Deleting items permanently

1. Open the main Metabase sidebar.
2. Click the `...` beside the "Collections" header in the sidebar.
3. Click **View archive**.
4. Hover over the item and click the **trash bin** icon.

The item will get permanently deleted from your application database.

Remember that [archiving](#archiving-items) and deleting items can have unanticipated ripple effects on related [dashboards](../dashboards/introduction.md), [subscriptions](../dashboards/subscriptions.md), and [SQL questions](../questions/native-editor/referencing-saved-questions-in-queries.md).

We recommend archiving because you can always unarchive if something breaks. If you delete an item and accidentally break something, you might have to recreate all of that work from scratch (unless you're prepared to revert to a backup of your application database).

### Deleting multiple items permanently

You can delete multiple items at once from the same collection:

1. Go to the collection.
2. Hover over the icon beside the name of the item and click the checkbox that appears.
3. When you're done selecting your items, click **Delete** at the bottom of the page.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions docs/exploration-and-organization/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Organization overview"

# Organization overview

Tools for finding things and keeping your Metabase organized.
Tools for finding things and keeping your Metabase organized.

## [Basic exploration](./exploration.md)

Expand All @@ -16,7 +16,11 @@ Organize questions, dashboards, and models with collections.

## [History](./history.md)

View changes to a question, dashboard or model, revert to previous versions, and archive outdated items.
View changes to a question, dashboard or model and revert to previous versions.

## [Delete and restore items](./delete-and-restore.md)

Move outdated outdated questions, models, and dashboards to trash, or delete them permanently.

## [Data reference](./data-model-reference.md)

Expand Down