Python driver for RethinkDB
Questions tagged [rethinkdb-python]
140 questions
0
votes
0 answers
How to retrieve data from RethinkDB via Django view?
Am trying to view data from RethinkDB in Django via custom middleware.
Below is the middleware code am using to connect to RethinkDB
@singleton
class rDBMiddleware(object):
connection = None
def __init__(self):
if self.connection == None:
…

Satheesh Panduga
- 818
- 2
- 13
- 32
0
votes
1 answer
Instructions or tutorial on how to access data from Rethink DB in django framework?
I'm searching for the instructions on how to access data from RethinkDB in Django framework but couldn't find in Django official web site. I could install rethinkdb driver in python3.4 using pip, but could find no simple demo on how to use it in the…

Satheesh Panduga
- 818
- 2
- 13
- 32
0
votes
1 answer
Find documents not referenced by another table
Kind of a "not_eq_join", if that makes sense.
A have a table A with documents containing a _key field (it's the primary key), and another table B that has a refs field that points to A._key, this is btw a multi index so it may contain multiple…

pythonator
- 384
- 2
- 12
0
votes
1 answer
Rethinkdb IO reaches 100%
Rethinkdb IO reaches 100% whenever there is a data upload. The load reaches near about 50. Is this a common phenomenon, or do we need to do some optimizations here?

hellodk
- 316
- 4
- 11
0
votes
2 answers
Subqueries to filter out in rethinkdb
How do write an equivalent statement in RethinkDB using Python client driver?
SELECT id fields FROM tasks WHERE id NOT IN (SELECT id FROM finished_tasks)
This is what I tried:
r.table('tasks').filter(lambda row: r.not(row['id'] in…

user462455
- 12,838
- 18
- 65
- 96
0
votes
1 answer
How can I do two fields count data in rethinkdb?
I would like to do two fields count data in rethinkdb python.
Example: My tables are..
Channel table
{
"channel_name": "channel01" ,
"id": "58115c5b-af1f-4b1a-b572-20611ba34ee5" ,
"userid": "b9936a2f-6cea-41ef-a7f8-1812c3192112" ,
"visibility": …

BloodKnight
- 9
- 3
0
votes
1 answer
Rethinkdb Client in Python Not Showing Field Values
For some reason Rethinkdb is not showing field values for valid objects when using the get() method:
>>> import rethinkdb as r
>>> conn = r.connect( "localhost", 28015)
>>> conn.repl()
>>>…

wspeirs
- 1,321
- 2
- 11
- 22
0
votes
1 answer
Rethinkdb mapreduce not has_fields not working properly
I'm trying to find the percent of records (grouped by company) that do not have phone numbers. I can do this with the following two queries:
r.table('users') \
.merge(lambda u: {'groups':…

wspeirs
- 1,321
- 2
- 11
- 22
0
votes
1 answer
Error on insert data on rethinkdb via python
with following python script:
#!/usr/bin/python3
import rethinkdb as r
import os
import configparser as c
from xml.dom import minidom
import urllib3
config = c.ConfigParser()
config
config.read("etc/db.py")
conn = r.connect(config.get("DB",…

Aldo Pellini
- 3
- 1
0
votes
1 answer
HA Proxy in rethinkdb
I'm trying to implement HA in rethink-db. Rethink-db documentation seems to be quite short, hence can someone here help in understanding How to we achieve HA in rethink-db?

hellodk
- 316
- 4
- 11
0
votes
1 answer
Rethinkdb Query Not Working
I'm doing the following query on Rethinkdb:
r.table('skydata').filter(r.row("DeviceID").eq("JBAnFrdlbkcO").and(r.row("TS").ge(0)).and(r.row("TS").le(143556949)) ).orderBy("TS")
It worked perfect when run directly on Data Explorer on their website…

J Freebird
- 3,664
- 7
- 46
- 81
0
votes
2 answers
RethinkDB chaining/combining filters
I have two filters that I need to combine.
This is my primary filter:
r.db('items').table('tokens').filter(r.row('valid_to').gt(r.now()))
and this is my secondary filter.
.filter(r.row["processed"] == False)
How do I combine these?

user1513388
- 7,165
- 14
- 69
- 111
0
votes
1 answer
rethinkdb aggregation based on sequence items
I'm currently going through the rethinkdb python tutorial.
Currently, I have 4 superheroes. In the example below, heroes is an alias for r.db("python_tutorial").table("heroes").
In[45]: list(heroes.run())
Out[44]:
[{u'appearances_count': 98,
…

Games Brainiac
- 80,178
- 33
- 141
- 199
0
votes
1 answer
Python, rethinkDB: progress of multiple inserts not displayed
I am inserting roughly 10k documents from a CSV file into a rethinkDB table; the code looks like this
print "inserting records",
with open('input.csv', 'rb') as csvfile:
reader = csv.reader(csvfile, delimiter=',')
for row in reader:
…

FLIR31207
- 73
- 1
- 7
0
votes
1 answer
Rethinkdb atomic retrieve and update
Say I have the following data structure:
{ "name": "i1", "time": 1, "status": 1}
{ "name": "i2", "time": 2, "status": 1}
{ "name": "i3", "time": 3, "status": 1}
{ "name": "i4", "time": 4, "status": 2}
I need to retrieve the item with the largest…

sanyi
- 5,999
- 2
- 19
- 30