Questions tagged [rethinkdb-python]

Python driver for RethinkDB

140 questions
0
votes
0 answers

Replace array element from rethinkdb if it exists,or else insert

{ "LOGIN": "ABC", "MESSAGE_UNPROCESSED": [ { "DATE": "20160219", "MESSAGE": [ { "address": "XYZ", "date": "1468385398746" }, { "address": "PQR", "date":…
Vinay Sawant
  • 368
  • 2
  • 7
  • 23
0
votes
1 answer

Insert data from nested list into separate table in rethinkdb

I have a table with about 2m records with following structure: { "fields": "values", "transactions": [ { 'from': '...', 'value': '...' } ] } Now I want to separate the data in transaction…
Visgean Skeloru
  • 2,237
  • 1
  • 24
  • 33
0
votes
1 answer

RethinkDB python query returns result different from data explorer

I am running a RethinkDB using the Python driver. Python Request: response = r.db("user_data_sets").table("indexes").get_all(r.args(['key1', 'key2'])).run() This request is only returning the key2 record in response. > len(response.items) > result…
getglad
  • 2,514
  • 3
  • 24
  • 47
0
votes
0 answers

Extremely slow, very simple update query in rethinkdb

Doing some simple work with rethinkdb, but getting really troublingly slow results. Have a process by which I shove ~23k objects into a rethink table. Strangely enough, that's the part that's fast. However the snippet below is bizarrely slow: #…
Slater Victoroff
  • 21,376
  • 21
  • 85
  • 144
0
votes
1 answer

Selection returning max,min and avg

I'm new on RethinkDB and need to return min , max and avg of "value" by grouping on "id", here's an example of my Json : { "mycontent": [ { "id": "000000000011", "value": "300" }, { "id": "000000000012", …
BitFlow
  • 37
  • 6
0
votes
1 answer

Error importing to RethinkDB

I am getting an error trying to import a json file into RethinkDB on a Google Cloud Compute Instance, and I have no idea what to do with this error. Any help is appreciated. Here is the error: root@my-server-name:~# rethinkdb import -f users_0.json…
Ben Simmons
  • 230
  • 1
  • 13
0
votes
1 answer

How to match nested values in RethinkDB?

I use Python client driver and the structure of my documents is : {"key1": ["value1"], "key2": ["value2"], ..., "key7": ["value7"]} let say "value7" is "In every time in every place, deeds of men remain the same" I'd like to retrieve all documents…
crocefisso
  • 793
  • 2
  • 14
  • 29
0
votes
1 answer

How to append tables in RethinkDB?

I have 3 tables t1, t2, and t3 on RethinkDB Each document (d) in t1 has 7 keys (k) and associated values. t1 looks like : {"key1": ["valued1k1t1"], "key2": ["valued1k2t1"], "key3": ["valued1k3t1"] , "key4": ["valued1k4t1"] ,"id": "UUIDd1t1",…
crocefisso
  • 793
  • 2
  • 14
  • 29
0
votes
1 answer

RethinkDB: matching a string from a list of strings

This is my table in rethinkDB [{"username": "row1", "some_key": ["str1", "str2"]}, {"username": "row2", "some_key": ["str3", "blah"]}, {"username": "row3", "some_key": ["blah", "blahblah"]}] The field(column) name can be repeated. I have a list…
compiler
  • 486
  • 1
  • 4
  • 14
0
votes
1 answer

RethinkDB clients connection failover between proxies

I have: 4 servers running a single RethinkDB instance in cluster (4 shards / 3 replicas tables) 2 application servers (tornado + RethinkDB proxy) The clients connect only to their local proxy. How to specify both the local + the other proxy so…
DevLounge
  • 8,313
  • 3
  • 31
  • 44
0
votes
1 answer

PyInstaller - ImportError: No module named 'rethinkdb'

I compile using pyinstaller -F ./parser.spec. Then I run the program with ./dist/parser and get this error: Traceback (most recent call last): File "", line 21, in ImportError: No module named 'rethinkdb' parser returned -1 I…
demux
  • 4,544
  • 2
  • 32
  • 56
0
votes
1 answer

RethinkDb do function based secondary indexes update themselves dynamically?

Let's say that I need to maintain an index on a table where multiple documents can relate do the same item_id (not primary key of course). Can one secondary compound index based on the result of a function which of any item_id returns the most…
DevLounge
  • 8,313
  • 3
  • 31
  • 44
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
  • 681
  • 1
  • 9
  • 19
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
  • 818
  • 2
  • 13
  • 32
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 , …