Python driver for RethinkDB
Questions tagged [rethinkdb-python]
140 questions
47
votes
3 answers
How to remove a key from a RethinkDB document?
I'm trying to remove a key from a RethinkDB document.
My approaches (which didn't work):
r.db('db').table('user').replace(function(row){delete row["key"]; return row})
Other approach:
r.db('db').table('user').update({key: null})
This one just…

Robert Zaremba
- 8,081
- 7
- 47
- 78
19
votes
1 answer
How to append an element to an array in rethinkdb
I have this object:
{
"id": "eb533cd0-fef1-48bf-9fb8-b66261c9171b" ,
"errors": [
"error1" ,
"error2"
]
}
I simply want to append a new error to errors array. I…

Sincere
- 477
- 5
- 18
7
votes
1 answer
RethinkDB losing data after restarting server
I save my data on RethinkDB Database. As long as I dont restart the server, all is well. But when I restart, it gives me an error saying database doesnt exist, although the folder and data does exist in folder rethinkdb_data. What is the problem ?

Prateek Narendra
- 1,837
- 5
- 38
- 67
5
votes
1 answer
How do I create a compound multi-index in rethinkdb?
I am using Rethinkdb 1.10.1 with the official python driver. I have a table of tagged things which are associated to one user:
{
"id": "PK",
"user_id": "USER_PK",
"tags": ["list", "of", "strings"],
// Other fields...
}
I want to…

tawmas
- 7,443
- 3
- 25
- 24
4
votes
0 answers
How do I configure a custom data store for Flask-Security?
I would like to use Flask-Security with RethinkDB, but I cannot get my custom RethinkDBUserDatastore to work properly. Below is the code I've created for the custom data store, plus the adapted example app from the Flask-Security…

Nicholas Tulach
- 1,023
- 3
- 12
- 35
4
votes
1 answer
How to filter on array size in rethinkdb?
I have a table with a bunch of documents that are updated regularly (in part).
What I'm essentially trying to do is create another table (called changes below) that stores the latest N changes to each of those documents.
I'm thus doing…

pythonator
- 384
- 2
- 12
4
votes
3 answers
rethinkdb: "RqlRuntimeError: Array over size limit" even when using limit()
I'm trying to access a constant number of the latest documents of a table ordered by a "date" key. Note that the date, unfortunately, was implemented (not by me...) such that the value is set as a string, e.g "2014-01-14", or sometimes "2014-01-14…

Kludge
- 2,653
- 4
- 20
- 42
3
votes
1 answer
"rethinkdb.errors.ReqlServerCompileError: Expected 2 arguments but found 1 in:" when trying to .update() with Python rethink
I'm working with RethinkDB using the Python module and right now I'm trying to update a model with this statement:
results = rethink.table(model + "s").filter(id=results["id"]).update(data).run(g.rdb_conn)
model is something being defined earlier…

RPiAwesomeness
- 5,009
- 10
- 34
- 52
3
votes
1 answer
How to create a parallel loop using aiohttp or asyncio in Python?
I would like to use rethinkdb .changes() feature to push some messages to users. The messages should send without any requests from the users.
I am using rethinkdb with aiohttp and websockets. How it works:
User sends message
Server puts it into…

andr2k
- 53
- 5
3
votes
2 answers
RethinkDB max file size attachments (BLOB)
I found in documentation that RethinkDB can store Binary Files (BLOBs).
This is great !
I have an ECM application and need to store 50.000.000 of files. ( from 8K until 1GB ).
I need to know what is the max file size in RethinkDB ?
Will be some…

Carlos
- 51
- 1
- 1
3
votes
1 answer
Using RethinkDB for "Full Text Search"
I am currently working on a web application where, ideally, I would be able to support a search bar on the documents that are going to be stored for users. Each of these documents is going to be a small snippet up to a decently-sized article. (I…

Freezerburn
- 1,013
- 3
- 11
- 29
2
votes
1 answer
Restore RethinkDB backup on MacOS Big Sur
My local Rethink database disappeared after upgrading to MacOS 11 (“Big Sur”). But that's alright, as I have a backup. But I can't, for the life of me, restore it.
rethinkdb restore [file] and rethinkdb import [file] didn't work, but after some…

Rasmus
- 345
- 2
- 7
2
votes
2 answers
Is pymongo asyncronous?
I work on a benchmark between pymongo and rethinkdb, to compare the time took for insertions.
However this is what I found :
for one-by-one insertions.
def chronometre_rethink_insert_one(data, nblines):
avant = time()
for i in…

Ezriel_S
- 248
- 3
- 11
2
votes
1 answer
How do I delete/update from nested document array
Given a document as below how can I delete or update from the nested document ingredients ? Any help, I am new to this rethinkdb. The table stores this documents called recipes.
[
{
"cook": "9 min",
"id":…

Arup Rakshit
- 116,827
- 30
- 260
- 317
2
votes
1 answer
Rethinkdb: returning more than one object from a query
I have a table with some rows that look like this:
{
"id": "12345"
"created_date": Fri May 27 2016 22:06:25 GMT+00:00 ,
"image": true
} {
"id": "6789"
"created_date": Mon May 30 2016 07:48:35 GMT+00:00 ,
"video": true
}{
"id":…

ApathyBear
- 9,057
- 14
- 56
- 90