Hello, is there an easy way to export the entire data of just a single collection using the cli or docker mariadb commands other than querying from api?
Example I have a Tasks and Projects collection, I just want to export all data from the Tasks collection using cli.
I did this with cloud function. it goes through all the documents of a collection and inserts in a csv. At the end save the file in storage. Help you?
@hosni.hotelkilow can we Mark it as solved?
Hello! Sorry I forgot to get back, thank you for this snippet ill use it as reference soon. In the end what I did was to echo out from the mariadb container as I did't want to call the api for it, I had to figure out the correct table name though
docker exec appwrite-mariadb sh -c 'exec mysql -B -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" appwrite -e "SELECT * FROM _1_database_1_collection_6;"' \
| sed "s/\"/\"\"/g;s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > medias.csv
[SOLVED] Export Entire Data of Collection
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...