Python driver for RethinkDB
Questions tagged [rethinkdb-python]
140 questions
1
vote
1 answer
Optimizing rethinkdb inner join query
For a given user I want to get all the runs that
satisfy some conditions
get only runs from projects that the user has access to
In Users table, every user has a list of project ids while in Runs table, every run has a project id. The following…

Sant
- 31
- 4
1
vote
1 answer
rethinkdb eqJoin on multiple fields
I want to run a query using join on two very large tables.
What is the equivalent rethinkdb syntax for this sql?
SELECT t1.uuid,t1.timestamp,t2.name
FROM t1
JOIN t2 ON t1.uuid=t2.uuid AND t1.timestamp=t2.timestamp
For the example reference, this is…

Zohar
- 11
- 1
1
vote
1 answer
Update a subdocument list object value in RethinkDB
{
"id": 1,
"subdocuments": [
{
"id": "A",
"name": 1
},
{
"id": "B",
"name": 2
},
{
"id": "C",
"name": 3
}
]
}
How do…

Ben
- 2,122
- 2
- 28
- 48
1
vote
1 answer
How to use RethinkDB's min/max functions with compound indices
Suppose I have a RethinkDB table with type and timestamp fields. The type can be either "good" or "bad". I would like to write a RethinkDB query which gets the timestamp of the most recent "good" document while making use of a compound index with…

Kurt Peek
- 52,165
- 91
- 301
- 526
1
vote
1 answer
How do I convert string to a date in rethinkdb using python?
My rethinkdb stores data in the following format.
data = [{
'appName': "app1",
'startTime': "Mon, 14 Feb 2017 05:10:00 GMT",
'endTime': "Mon, 14 Feb 2017 05:15:00 GMT",
'status': "SUCCESS"
},
{
'appName':…

Sajani
- 117
- 8
1
vote
1 answer
ImportError: Cannot import name 'Asset' bigchaindb
I've installed bigchaindb correctly (I believe) but I keep getting an error when I run the following python command
from bigchaindb_driver import BigchaindDB
File "", line 1, in
File…

Lone Ronin
- 2,530
- 1
- 19
- 31
1
vote
0 answers
RethinkDB Python Driver Windows
I would need the import function of the rethinkDB. To use this function, the python driver has to be used. There is a tutorial in the documentation, which explains how to install the python driver for Linux, but there is no explanation for…

Philipp Hellmayr
- 312
- 2
- 11
1
vote
1 answer
starting rethinkdb in commandline doesn't coming back to shell prompt
I need to change the server_name of a running rethinkdb instance. I have stopped the server and update the /etc/rethinkdb/instances.d/default.conf file and then removed the metadata & rethinkdb_data from /var/lib/rethinkdb/default/data location. …

suru1432002
- 143
- 2
- 8
1
vote
2 answers
Handling missing fields when using Python lambda's
I have this rethinkDB query which basically returns the documents which "basicConstraints" fields that start with "CA:FA".
However in some of my documents the "basicConstraints" field does not exist.
q = r.db('scanafi').table(active_table)…

user1513388
- 7,165
- 14
- 69
- 111
1
vote
1 answer
rethinkdb join: Cannot reduce over an empty stream
I have two simple tables:
Users Table:
{
"activated": true ,
"created": Wed Jun 22 2016 15:22:32 GMT+00:00 ,
"email": email@email.com, »
"id": "5071f620-576a-49c0-ae84-e9f32db2a034" ,
"roles": [
"Admin"
] ,
"sso": "123456789"
}
Roles…

ApathyBear
- 9,057
- 14
- 56
- 90
1
vote
1 answer
how to unpack array into variables
Let's say we have this document:
doc = {'foo': 1, 'bar': 2, id: 123}
How can I do so that I can have, a pair with foo and bar values, the id and assign these to 2 variables? I need this so that I can use these variables inside my complicated query…

DevLounge
- 8,313
- 3
- 31
- 44
1
vote
1 answer
SQL to REQL how to?
I'm new to Reql and i'm trying to figure out how to transform my simple Sql request to Reql (i'm using python with rethinkdb)
Select id, min(value), max(value), avg(value)
From mytable
Group by id
Having timestamp between '2003-12-05T15:01:00.05Z'…

BitFlow
- 37
- 6
1
vote
1 answer
Rethinkdb multiple updates with conditional check
I've a little question about a rethinkdb request in python.
I've a nested document like this:
{'id': XX, 'markets_tracking': {'market_name_1': { 'latest_update': (timestamp), 'market_data': { 'type_1': {'place1': XX, 'place2': XX}, {'type_2':…

Matt
- 4,309
- 7
- 38
- 52
1
vote
1 answer
Feed Rethinkdb with scrapy
I'm looking for a simple tutorial explaining how to write items to Rethinkdb from scrapy. The equivalent can be found for MongoDB here.

crocefisso
- 793
- 2
- 14
- 29
1
vote
0 answers
rethinkdb: secondary compound indexes / aggregation queries and intermediate documents generation
Let's assume such table content where for the same product_id, we have as many rows than updates during status==1 (published) and finally status==0 (unpublished) and then becomes==2 (deleted)
{id: , product_id: 1, last_updated: 2015-12-1,…

DevLounge
- 8,313
- 3
- 31
- 44