Questions tagged [rethinkdb-python]

Python driver for RethinkDB

128 questions
0
votes
2 answers

Rethinkdb - function attribute error

I'm writing an application that broadly follows this example. When I submit a POST request like: curl http://localhost:5000/todos -d "data=Remember the milk" -X POST I get the following error from RethinkDB: rethinkdb/ast.py", line 118, in run …
arlogb
  • 661
  • 1
  • 8
  • 19
0
votes
1 answer

How to apply Greater than equal in python lambda expression in Rethinkdb

I have below json record in RethinkDB table. [{ "pid": 12, "sk": [ { "sid": 30, "et": 3 }, { "sid": 22, "et": 10 }, { "sid": 30, "et": 8 } ], "wc": [ …
Satheesh Panduga
  • 779
  • 1
  • 8
  • 28
0
votes
1 answer

Filter nested fields in RethinkDB rows based on multiple values

I have below json in RethinkDB table [{"pid": 0, "sk": [ { "sid": 30, "et": 3 }, { "sid": 22, "et": 10 }, { "sid": 30, "et": 10 } ], "wc": [ { "wid": 29, "et": 8 }, { "wid": 30, "et": 2 …
Satheesh Panduga
  • 779
  • 1
  • 8
  • 28
0
votes
1 answer

rethinkDB eq(0) return value is not built-in boolean type?

Can anyone help me?? Why the return value of row['TimeInBucket1'].eq(0) is not True or False???? I Here is the code in python def map1(row): flgTB1 = row['TimeInBucket1'].eq(0) return {'nMX1Pop': 0 if flgTB1 else 1 , …
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
  • 779
  • 1
  • 8
  • 28
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
  • 779
  • 1
  • 8
  • 28
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
  • 377
  • 2
  • 10
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
  • 266
  • 3
  • 9
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
  • 10,358
  • 18
  • 59
  • 88
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": …
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,171
  • 2
  • 10
  • 19
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,171
  • 2
  • 10
  • 19
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",…
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?
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
  • 2,984
  • 3
  • 32
  • 72
1 2 3
8
9