Questions tagged [rethinkdb-python]

Python driver for RethinkDB

128 questions
0
votes
1 answer

RethinkDB Join and Order using Python

I would like to join and order the field in RethinkDB. My tables and sample data is: Category Table { "id": "2be434e0-0f34-4705-ba7f-560437a8e65c" , "name": "IT" } { "id": "76db46b7-2b1b-4c6e-99dd-83852d921ec0" , "name": "Electronic" } { "id": …
0
votes
1 answer

Rethinkdb - Atomic retrieve/update row with specific condition

I have a bunch of celery workers that need to get single record(row) from the database. It should only be returned if 60 seconds passed since "last_used" field and as soon as returned, it should update the "last_used" with current time(so other…
Nema Ga
  • 1,940
  • 3
  • 17
  • 39
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
  • 87
  • 2
  • 14
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,089
  • 1
  • 19
  • 32
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,035
  • 1
  • 20
  • 39
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
  • 19,762
  • 18
  • 78
  • 135
0
votes
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
  • 7,345
  • 2
  • 26
  • 39
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
  • 210
  • 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
  • 557
  • 1
  • 5
  • 20
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
  • 557
  • 1
  • 5
  • 20
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
  • 446
  • 1
  • 4
  • 13
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
  • 7,345
  • 2
  • 26
  • 39
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,088
  • 1
  • 25
  • 51
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
  • 7,345
  • 2
  • 26
  • 39
1 2 3
8 9