Skip to content

Commit 2e987b1

Browse files
committed
update: cover and remove sdk examples.
1 parent 104b356 commit 2e987b1

File tree

3 files changed

+1
-232
lines changed

3 files changed

+1
-232
lines changed

src/routes/blog/post/announcing-csv-imports/+page.markdoc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Announcing: Document imports from CSV files"
44
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.
55
date: 2025-07-01
66
# update this cover later, once available!
7-
cover: /images/blog/planetscale-databases-alternative/cover.png
7+
cover: /images/blog/announcing-csv-imports/cover.png
88
timeToRead: 5
99
author: darshan-pandya
1010
category: announcement
@@ -55,13 +55,6 @@ CSV imports are built to scale seamlessly with your data. Whether you're working
5555

5656
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.
5757

58-
## Automate with API and SDKs
59-
60-
You can also trigger imports using the Appwrite API or SDKs. This is useful for scripted workflows, automated CI/CD pipelines, or admin dashboards.
61-
62-
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.
63-
64-
6558
## Availability and resources
6659

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

src/routes/docs/products/databases/csv-imports/+page.markdoc

Lines changed: 0 additions & 224 deletions
Original file line numberDiff line numberDiff line change
@@ -56,230 +56,6 @@ To import documents using the Appwrite Console:
5656

5757
CSV imports run as background tasks. The Console displays a floating progress bar while the import is active.
5858

59-
# Import documents using the API {% #import-api %}
60-
61-
You can also trigger imports using the Appwrite API or SDKs.
62-
63-
{% multicode %}
64-
65-
```http
66-
POST https://<REGION>.cloud.appwrite.io/v1/migrations/csv
67-
X-Appwrite-Project: "<PROJECT_ID>"
68-
Content-Type: application/json
69-
70-
{
71-
"bucketId": "<BUCKET_ID>",
72-
"fileId": "<FILE_ID>",
73-
"resourceId": "<DATABASE_ID>:<COLLECTION_ID>"
74-
}
75-
```
76-
77-
```server-nodejs
78-
const sdk = require('node-appwrite');
79-
80-
// Init SDK
81-
const client = new sdk.Client();
82-
const migrations = new sdk.Migrations(client);
83-
84-
client
85-
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
86-
.setProject('<PROJECT_ID>') // Your project ID
87-
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
88-
;
89-
90-
const promise = migrations.createCsvMigration('<BUCKET_ID>', '<FILE_ID>', '<DATABASE_ID>:<COLLECTION_ID>');
91-
92-
promise.then(function (response) {
93-
console.log(response);
94-
}, function (error) {
95-
console.log(error);
96-
});
97-
```
98-
99-
```deno
100-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
101-
102-
// Init SDK
103-
let client = new sdk.Client();
104-
let migrations = new sdk.Migrations(client);
105-
106-
client
107-
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
108-
.setProject('<PROJECT_ID>') // Your project ID
109-
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
110-
;
111-
112-
let promise = migrations.createCsvMigration('<BUCKET_ID>', '<FILE_ID>', '<DATABASE_ID>:<COLLECTION_ID>');
113-
114-
promise.then(function (response) {
115-
console.log(response);
116-
}, function (error) {
117-
console.log(error);
118-
});
119-
```
120-
121-
```php
122-
<?php
123-
124-
use Appwrite\Client;
125-
use Appwrite\Services\Migrations;
126-
127-
$client = new Client();
128-
129-
$client
130-
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
131-
->setProject('<PROJECT_ID>') // Your project ID
132-
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
133-
;
134-
135-
$migrations = new Migrations($client);
136-
137-
$result = $migrations->createCsvMigration('<BUCKET_ID>', '<FILE_ID>', '<DATABASE_ID>:<COLLECTION_ID>');
138-
```
139-
140-
```python
141-
from appwrite.client import Client
142-
from appwrite.services.migrations import Migrations
143-
144-
client = Client()
145-
146-
(client
147-
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
148-
.set_project('<PROJECT_ID>') # Your project ID
149-
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
150-
)
151-
152-
migrations = Migrations(client)
153-
154-
result = migrations.create_csv_migration('<BUCKET_ID>', '<FILE_ID>', '<DATABASE_ID>:<COLLECTION_ID>')
155-
```
156-
157-
```ruby
158-
require 'Appwrite'
159-
160-
include Appwrite
161-
162-
client = Client.new
163-
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
164-
.set_project('<PROJECT_ID>') # Your project ID
165-
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
166-
167-
migrations = Migrations.new(client)
168-
169-
response = migrations.create_csv_migration(bucket_id: '<BUCKET_ID>', file_id: '<FILE_ID>', resource_id: '<DATABASE_ID>:<COLLECTION_ID>')
170-
171-
puts response.inspect
172-
```
173-
174-
```csharp
175-
using Appwrite;
176-
using Appwrite.Services;
177-
using Appwrite.Models;
178-
179-
var client = new Client()
180-
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
181-
.SetProject("<PROJECT_ID>") // Your project ID
182-
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
183-
184-
var migrations = new Migrations(client);
185-
186-
var result = await migrations.CreateCsvMigration(
187-
bucketId: "<BUCKET_ID>",
188-
fileId: "<FILE_ID>",
189-
resourceId: "<DATABASE_ID>:<COLLECTION_ID>"
190-
);
191-
```
192-
193-
```dart
194-
import 'package:dart_appwrite/dart_appwrite.dart';
195-
196-
void main() {
197-
Client client = Client();
198-
Migrations migrations = Migrations(client);
199-
200-
client
201-
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
202-
.setProject('<PROJECT_ID>') // Your project ID
203-
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
204-
;
205-
206-
Future result = migrations.createCsvMigration(
207-
bucketId: '<BUCKET_ID>',
208-
fileId: '<FILE_ID>',
209-
resourceId: '<DATABASE_ID>:<COLLECTION_ID>',
210-
);
211-
212-
result.then((response) {
213-
print(response);
214-
}).catchError((error) {
215-
print(error.response);
216-
});
217-
}
218-
```
219-
220-
```kotlin
221-
import io.appwrite.Client
222-
import io.appwrite.services.Migrations
223-
224-
val client = Client(context)
225-
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
226-
.setProject("<PROJECT_ID>") // Your project ID
227-
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
228-
229-
val migrations = Migrations(client)
230-
231-
val response = migrations.createCsvMigration(
232-
bucketId = "<BUCKET_ID>",
233-
fileId = "<FILE_ID>",
234-
resourceId = "<DATABASE_ID>:<COLLECTION_ID>"
235-
)
236-
```
237-
238-
```java
239-
import io.appwrite.Client;
240-
import io.appwrite.coroutines.CoroutineCallback;
241-
import io.appwrite.services.Migrations;
242-
243-
Client client = new Client()
244-
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
245-
.setProject("<PROJECT_ID>") // Your project ID
246-
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
247-
248-
Migrations migrations = new Migrations(client);
249-
250-
migrations.createCsvMigration(
251-
"<BUCKET_ID>",
252-
"<FILE_ID>",
253-
"<DATABASE_ID>:<COLLECTION_ID>",
254-
new CoroutineCallback<>((result, error) -> {
255-
if (error != null) {
256-
error.printStackTrace();
257-
return;
258-
}
259-
System.out.println(result);
260-
})
261-
);
262-
```
263-
264-
```swift
265-
import Appwrite
266-
267-
let client = Client()
268-
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
269-
.setProject("<PROJECT_ID>") // Your project ID
270-
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
271-
272-
let migrations = Migrations(client)
273-
274-
let migration = try await migrations.createCsvMigration(
275-
bucketId: "<BUCKET_ID>",
276-
fileId: "<FILE_ID>",
277-
resourceId: "<DATABASE_ID>:<COLLECTION_ID>"
278-
)
279-
```
280-
281-
{% /multicode %}
282-
28359
# Additional resources {% #additional-resources %}
28460

28561
- [Appwrite CLI for Migrations](/docs/command-line-tools)
163 KB
Loading

0 commit comments

Comments
 (0)