Skip to content

CSV import docs #2103

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
22fbb5b
new: csv import feature blog post.
ItzNotABug Apr 20, 2025
55e86f8
address comments.
ItzNotABug Apr 21, 2025
9c7792d
Update src/routes/blog/post/announcing-csv-imports/+page.markdoc
ItzNotABug Apr 24, 2025
c6e58f0
Update src/routes/blog/post/announcing-csv-imports/+page.markdoc
ItzNotABug Apr 24, 2025
d1fa120
Apply suggestions from code review
ItzNotABug Apr 24, 2025
98cf60e
address comments.
ItzNotABug Apr 24, 2025
54c1a87
Merge branch 'add-project-v-docs' into csv-blogpost
ItzNotABug Apr 24, 2025
b066da6
add: rough docs.
ItzNotABug Apr 24, 2025
8681c4d
fix: typos.
ItzNotABug Apr 24, 2025
25bd77b
Merge remote-tracking branch 'origin/csv-blogpost' into csv-blogpost
ItzNotABug Apr 24, 2025
a923ef6
update: content sdk; add: images.
ItzNotABug Apr 27, 2025
6b66622
Merge branch 'add-project-v-docs' into csv-blogpost
ItzNotABug Apr 28, 2025
e5b91a3
Merge branch 'add-project-v-docs' into csv-blogpost
ItzNotABug May 7, 2025
e098417
Merge branch 'main' into csv-blogpost
ItzNotABug May 29, 2025
9fa7342
Add type generation docs
adityaoberai Jun 13, 2025
12ffa44
Update src/routes/blog/post/announcing-csv-imports/+page.markdoc
adityaoberai Jun 13, 2025
c77f112
Temporarily remove New tag
adityaoberai Jun 13, 2025
b93c3da
Merge pull request #1929 from appwrite/csv-blogpost
adityaoberai Jun 13, 2025
bfcaab0
prettier
adityaoberai Jun 13, 2025
c1e7efc
Update type gen example
adityaoberai Jun 13, 2025
eeba771
unlist csv import announcements blog
adityaoberai Jun 13, 2025
8deb1f0
Add upsert section
adityaoberai Jun 13, 2025
2491f16
Shift type gen docs to different PR
adityaoberai Jun 20, 2025
700cfe3
Shift upsert docs to different branch
adityaoberai Jun 20, 2025
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
10 changes: 5 additions & 5 deletions STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,21 @@ the tone and voice remains consistent.
- All titles, headings, buttons, and labels should be written in **sentence case**. If you're not sure what sentence case should look like, check [APA's style guide](https://apastyle.apa.org/style-grammar-guidelines/capitalization/sentence-case) or check with ChatGPT and other LLMs which reliably converts titles to sentence case.
- All headings in a docs page begin with `# Heading` then `## Heading` and `### Heading`. Internally, they're converted to H2 to H4 tags.
- All headings should have an ID label, for example `# Cool heading {% #cool-heading %}` the `#cool-heading` ID will be used to generate the table of contents and add links to the heading.
- Prefer verbs over gerunds, for example, say "Create documents" not "Creating documents".
- Prefer verbs to gerunds, for example, say "Create documents" not "Creating documents".

### Extended Markdoc components

Appwrite's documentation uses extended markdown syntax. You can find all of the available partials types in the [CONTENT.md file](./CONTENT.md).
Appwrite's documentation uses extended Markdown syntax. You can find all the available partials types in the [CONTENT.md file](./CONTENT.md).

### Screenshots

- When contributing upload original screenshots. The Appwrite design team will edit the screenshot to be consistent with other screenshots in the docs.
- Screenshots must be 16:9
- Screnshots should be taken in a 1400 x 900 view port on 3x DPR in browser developer tools.
- Screenshots should be taken in a 1400 x 900 view port on 3x DPR in browser developer tools.
- Use generic and sensible organization, project, and resource names. Avoid names like `test`, `demo`, or `sdlkfj`.
- All screenshot should be take from a user named Walter O'Brien. You can change the name of your current user by going to your Appwrite Console and clicking the **top right profile icon** > **Your Account** > **Name**.
- All screenshot should be taken from a user named Walter O'Brien. You can change the name of your current user by going to your Appwrite Console and clicking the **top right profile icon** > **Your Account** > **Name**.
- Screenshots are stored in the `/images/docs/` folder, in a parent folder that is consistent with the path of the docs that reference the image.
- All screenshots must be both dark and light mode, with `/path/` holding the lightmode version and `/path/dark/` holding the dark mode version.
- All screenshots must be both dark and light mode, with `/path/` holding the light-mode version and `/path/dark/` holding the dark mode version.
- Screenshots should be uploaded as un-edited original. Request help from the Appwrite design team to help you edit and refine your photos according to our guidelines.

```md
Expand Down
2 changes: 1 addition & 1 deletion src/markdoc/nodes/Image.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{/if}
{:else}
<div class="web-media main">
<img {src} {alt} {title} loading="lazy" class="aspect-video w-full" />
<img {src} {alt} {title} loading="lazy" class="aspect-video w-full object-cover" />
<div class="abs">
<Tooltip closeOnPointerDown>
<Button variant="secondary" class="cursor-pointer" action={trigger}>
Expand Down
78 changes: 78 additions & 0 deletions src/routes/blog/post/announcing-csv-imports/+page.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
layout: post
title: "Announcing: Document imports from CSV files"
description: Learn how to import documents into your Appwrite collections using a simple CSV file, a new feature built on top of Appwrite's migration APIs.
date: 2025-04-20
# update this cover later, once available!
cover: /images/blog/planetscale-databases-alternative/cover.png
timeToRead: 5
author: darshan-pandya
category: announcement
featured: false
draft: true
unlisted: true
---

We're introducing a new way to populate your Appwrite databases: **document imports from CSV files**.

Built on top of Appwrite's migration APIs, this feature makes it easy to bring in large datasets, seed collections, or migrate structured data using only a CSV file.

The CSV document import is useful for migrating user data from external systems, importing inventory records, seeding test environments, or onboarding structured content such as FAQs.

# How it works

To get started, create a collection and define its attributes in the Appwrite Console. Your CSV file should follow a standard format:

- The first row must be a header containing attribute names that match your collection
- Each subsequent row represents a document, with values separated by commas

{% info title="Good to know" %}
You can optionally include the `$id` column to assign custom document IDs.
{% /info %}

![Collections screen](/images/blog/announcing-csv-imports/csv-import.png)

All required attributes must be present in the CSV, and Appwrite will validate each row before importing it.

For example, if your collection contains attributes like `title`, `author`, `year`, and `available`, a valid CSV file would look like this:

```text
$id,title,author,year,available
f3k91x8b2q,Harry Potter and the Sorcerer's Stone,J.K. Rowling,1997,true
mz7lq3dp5c,The Fellowship of the Ring,J.R.R. Tolkien,1954,true
x0v4p8ncq2,To Kill a Mockingbird,Harper Lee,1960,false
kq9nmv13ru,The Great Gatsby,F. Scott Fitzgerald,1925,true
p8lw39xsd1,Catch-22,Joseph Heller,1961,true
v42cj0quxp,Pride and Prejudice,Jane Austen,1813,true
```

## Uploading your CSV file

You can upload a new file during import or select an existing one from your project's storage bucket.
The Console provides a guided interface to help you select the CSV and link it to your target collection. Once uploaded, the import process begins immediately.

## Designed for scale

CSV imports are built to scale seamlessly with your data. Whether you're working with a small dataset or importing production-grade records, the system is designed to handle high volumes reliably and efficiently.

The import system performs per-row validation and runs as a background task, allowing it to handle large files efficiently. This ensures reliable performance across a range of scenarios—from lightweight configuration data to large-scale production imports.

## Automate with API and SDKs

You can also trigger imports using the Appwrite API or SDKs. This is useful for scripted workflows, automated CI/CD pipelines, or admin dashboards.

All you need is a CSV file in your project's storage and the target collection ID. The rest is handled by Appwrite's import system.


## Availability and resources

CSV imports are now available on **Appwrite Cloud** and in the latest self-hosted release.

To learn more, check out the [official documentation](/docs/products/databases/csv-imports).
If you have any questions or feedback, we'd love to hear from you in the [Appwrite Discord community](https://discord.gg/appwrite).

# Further reading

- [Introducing Database Backups](https://appwrite.io/blog/post/introducing-database-backups?doFollow=true)
- [Best database pagination technique](https://appwrite.io/blog/post/best-pagination-technique?doFollow=true)
- [How to plan and execute database migration successfully with the new Appwrite CLI](https://appwrite.io/blog/post/how-to-execute-database-migration-with-appwrite-cli?doFollow=true)
5 changes: 5 additions & 0 deletions src/routes/docs/products/databases/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import Docs from '$lib/layouts/Docs.svelte';
import { isNewUntil } from '$lib/utils/date';
import Sidebar, { type NavParent, type NavTree } from '$lib/layouts/Sidebar.svelte';

const parent: NavParent = {
Expand Down Expand Up @@ -51,6 +52,10 @@
{
label: 'Backups',
href: '/docs/products/databases/backups'
},
{
label: 'CSV Imports',
href: '/docs/products/databases/csv-imports'
}
]
},
Expand Down
Loading