Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .optimize-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,11 @@
"images/docs/command-center/dark/command-center.png": "d3c26f78c419d22fa9779baf884561ac117a0597347310e54e6ee14c972c8a11",
"images/docs/databases/ai-suggestions-enable.png": "d331d502fb141cf28478cad2b2e96f0e622eae9c97625976c756ff52343dad77",
"images/docs/databases/ai-suggestions-review.png": "9796a6afa6164126acdfea67561c560fade3d39e51d2fec6bd9d6cf034ef0aa1",
"images/docs/databases/csv-export.png": "978aeeb301b9d7571793a5184fe955dae7a8a3ab7fbd0c613b12ccac73d51980",
"images/docs/databases/csv-import.png": "6ee80ce77a3a57b2e11b3887e3397b880472e066c1c6168fe0a633a09a5a8c62",
"images/docs/databases/dark/ai-suggestions-enable.png": "ea984bc7665a6e8d5e7dfc6df3281429a277e0c8402f2c7befbfcf96dba53b11",
"images/docs/databases/dark/ai-suggestions-review.png": "49d3e2636655ba3b76e271bc4cebdf005aa79f607e9185f3b49288adbc864a20",
"images/docs/databases/dark/csv-export.png": "8d2fbffbdc4b1e6e443d61a93fe4a331ecd91c66ae1457270f51f296c406aeb9",
"images/docs/databases/dark/csv-import.png": "bdd1e700c747e703ac75b744a8e1caa7e0704ac3439e4ed1077ee0a8e76389d3",
"images/docs/databases/dark/databases.png": "2cc14bcda3d289c3fb77f8ee4f432d93b46bd0b9755cbf26a53fcadbca3cf32b",
"images/docs/databases/dark/manual-backup.png": "539bdf15bf654a1a696951f4447465b286566460b311ce3db82eb010502a7e03",
Expand Down
7 changes: 6 additions & 1 deletion src/routes/docs/products/databases/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
href: '/docs/products/databases/csv-imports',
new: isNewUntil('31 Jul 2025')
},
{
label: 'CSV exports',
href: '/docs/products/databases/csv-exports',
new: isNewUntil('28 Feb 2026')
},
{
label: 'AI suggestions',
href: '/docs/products/databases/ai-suggestions',
Expand Down Expand Up @@ -145,7 +150,7 @@
.replace('tables', 'collections')
);

const hideSubtitleRoutes = ['offline', 'backups', 'csv-imports'];
const hideSubtitleRoutes = ['offline', 'backups', 'csv-imports', 'csv-exports'];

const shouldShowSubtitle = $derived(
!hideSubtitleRoutes.some((segment) => page.route.id?.includes(segment)) &&
Expand Down
125 changes: 125 additions & 0 deletions src/routes/docs/products/databases/csv-exports/+page.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
layout: article
title: CSV exports
description: Export table data to CSV files from the Console. Share clean datasets with your team without writing custom scripts.
---

Appwrite's CSV Export feature allows you to export rows from a table to a CSV file. This is especially useful for reporting, sharing data with non-technical team members, creating custom backups, or handing off datasets to analytics tools.

This feature is available in both Appwrite Cloud and the self-hosted version.

# Export configuration {% #export-configuration %}

Before exporting, you can configure several options to control the output format and contents. These settings ensure you get exactly the data you need in the format your tools expect.

## Apply filters {% #apply-filters %}

You can apply filters to your table from the table view and use those to export only the rows you need. This is especially useful when you want to export a subset of your data for a specific use case.

## Select columns {% #select-columns %}

You can choose which columns to include in your export. By default, all columns are exported, but selecting specific columns creates cleaner, more focused datasets that are easier to work with in spreadsheets and analytics tools.

{% info title="Good to know" %}
System columns like `$id`, `$createdAt`, and `$updatedAt` are automatically included in the export.
{% /info %}

## Custom delimiter {% #custom-delimiter %}

You can set a custom delimiter for your CSV file. While commas are standard, you can use tabs, semicolons, or other delimiters based on your requirements or the tools you're importing into.

Common delimiters:
- **Comma (`,`)**: Standard format, compatible with most tools
- **Tab**: Useful when your data contains many commas
- **Semicolon (`;`)**: Common in European Excel versions
- **Pipe (`|`)**: Useful when your data contains many semicolons

## Header row {% #header-row %}

You can choose whether to include a header row with column names. Headers make it easier to understand the data in spreadsheets, but some import tools work better without them.

# Relationship handling {% #relationship-handling %}

When exporting data that includes [relationships](/docs/products/databases/relationships) to other tables, Appwrite exports only the related row IDs by default. This keeps your CSV files clean and prevents deeply nested data structures that can break spreadsheet tools.

For example, if you have a `posts` table with a relationship to an `authors` table, the export will include the author ID rather than all author details.

An example of exported data with relationships:

```text
$id,title,author_id,published
post-1,Getting started with Appwrite,user-123,true
post-2,Advanced queries,user-456,true
post-3,CSV exports guide,user-123,false
```

# Timestamps {% #timestamps %}

The `$createdAt` and `$updatedAt` columns are exported in ISO 8601 format, making them compatible with most spreadsheet and database tools.

# Permissions {% #permissions %}

If row-level security is enabled for your table, the `$permissions` column will be included in the export. Permission strings are formatted as comma-separated role definitions within quotes.

```text
$id,title,$permissions
post-1,Public post,"read(""any""),update(""user:user-123"")"
post-2,Team post,"read(""team:team-456""),update(""team:team-456"")"
```

The roles used are API strings that can be found in the [permissions documentation](/docs/products/databases/permissions).

# Background processing {% #background-processing %}

Large exports run as background tasks to avoid blocking your workflow. When an export completes, you'll receive an email with a short-lived download link to retrieve your CSV file.

This means you can start an export, close the Console, and return later to download your file. The Console displays a floating progress bar while the export is active.

# Export from the Console {% #export-console %}

To export rows using the Appwrite Console:

1. Go to your project and navigate to **Databases**
2. Select your target database and navigate to your target table
3. Click on the **Export CSV** button in the action area
4. Configure your export options:
- Choose which columns to include (optional)
- Set your preferred delimiter
- Choose whether to include headers
5. Click **Export**

{% only_dark %}
![CSV export screen](/images/docs/databases/dark/csv-export.png)
{% /only_dark %}
{% only_light %}
![CSV export screen](/images/docs/databases/csv-export.png)
{% /only_light %}

The export will begin processing in the background. You'll see a progress indicator and receive an email when the export is ready to download.

# Use cases {% #use-cases %}

CSV exports are useful for many common workflows:

- **Reporting**: Generate reports for stakeholders who need data in spreadsheet format
- **Data sharing**: Share clean datasets with non-technical team members
- **Analytics hand-off**: Provide datasets to analysts using BI tools
- **Compliance exports**: Create audit trails and compliance records
- **Custom backups**: Archive specific data subsets for record-keeping
- **Migration preparation**: Extract data for migration to other systems

# Best practices {% #best-practices %}

To get the most out of CSV exports:

1. **Use filters to filter data**: Export only the rows you need to reduce file size and processing time
2. **Select specific columns**: Choose relevant columns to create cleaner, more focused datasets
4. **Choose appropriate delimiters**: Use tabs or semicolons if your data contains many commas
5. **Consider header requirements**: Include headers for human readability, exclude them for automated imports

# Additional resources {% #additional-resources %}

- [CSV Imports](/docs/products/databases/csv-imports) - Import data from CSV files
- [Relationships](/docs/products/databases/relationships) - Define connections between tables
- [Database Permissions](/docs/products/databases/permissions) - Configure row-level security
- [Database Backups](/docs/products/databases/backups) - Automated backup policies
Binary file added static/images/docs/databases/csv-export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/docs/databases/dark/csv-export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.