140 questions
1
vote
1
answer
118
views
Connection to rethinkdb refused in docker compose
I am new to rethinkdb and docker compose and have been trying things. But I encountered a problem when trying to run a small data migration project using docker compose. To be more specific, I ran a ...
0
votes
1
answer
58
views
Python / Rethink DB Append Nested Array
I am trying to use python to add elements nested array in a RethinkDB. I was able to edit the "vendors" list by using the following code. But now I want to append the array 1 nest deeper. ...
0
votes
1
answer
126
views
Is there a way to do wj with aggration on columns from the left table?
I have below code. weight is from the right table, and the aggregation works. weightLeft is from the left table, and the aggregation doesn't work. Is it possible to make weightLeft works?
t:([]sym:3#`...
0
votes
1
answer
78
views
wj failed for columns' sum product
I have below code and I want to do sumproduct. When I do sum(weight) at wj, it works. But if I do sum(weight*price) at wj, it failed. How can I do the sumproduct? Thanks!!
t:([]sym:3#`ibm;time:10:01:...
1
vote
1
answer
82
views
JSON Parsing with python from Rethink database [Python]
Im trying to retrieve data from a database named RethinkDB, they output JSON when called with r.db("Databasename").table("tablename").insert([{ "id or primary key": line}]...
-1
votes
1
answer
390
views
Join columns to a table in parallel
Currently I use a function to run an aj join for a single column from a large table on to a smaller table which has its time column shifted t milliseconds ahead, joining on a sym column as well as ...
0
votes
1
answer
45
views
How to delete a set of data based on group in RethinkDB with Python
I have a table with musical instruments and I want to split them by category count their number and if a category groups is larger than a number delete all the instruments in that group. My code ...
0
votes
1
answer
90
views
How to check if table exists in RethinkDB with Python
I wish to check if a table already exists in RethinkDB with the python client before trying to create the table. If you try to create the table and it exists it throws an error. So how can I check ...
0
votes
1
answer
28
views
How to check the type of a document element (sub document vs list)? "ReqlServerCompileError: Variable name not found in: var_1"
I extend the RethinkDb API by providing some extra functions.
For example I simplify the expression
site_ids = r.table('periods')\
['regions']\
.concat_map(lambda row: row['...
0
votes
1
answer
54
views
rethinkdb python eqJoin with filter not working
I have two tables records
[
{
"payload": {
"uuid": "123",
"version": "1.0.0"
},
"record_id":"rec-123"
}...
0
votes
1
answer
237
views
Rethinkbd changefeeds for flutter dart
I am using rethinkdb in my app. I can insert and retrieve data using the "rethink_db_ns" package. But I need to get data in real-time. for that, I am using This method
Future<void> ...
0
votes
1
answer
78
views
Fetch records by multiple indexes
What is the most efficient way to get all records by two indexes?
Lets say we have two secondary indexes, end_block_num and public_key and the values bellow:
end_block_num = 1000
public_key = "...
2
votes
1
answer
225
views
Restore RethinkDB backup on MacOS Big Sur
My local Rethink database disappeared after upgrading to MacOS 11 (“Big Sur”). But that's alright, as I have a backup. But I can't, for the life of me, restore it.
rethinkdb restore [file] and ...
3
votes
2
answers
4k
views
Is pymongo asynchronous?
I work on a benchmark between pymongo and rethinkdb, to compare the time took for insertions.
However this is what I found :
for one-by-one insertions.
def chronometre_rethink_insert_one(data, ...
0
votes
1
answer
111
views
How to connect rethinkdb in Openshift using rethinkdbdash
Could someone help to connect to rethinkdb in openshift using rethinkdbdash
I have deployed rethinkdb in openshift & create 3 clusterIP services
1.8080 - admin
2.29015 - intracluster communicated
...
1
vote
1
answer
1k
views
Rethinkdb: "Connection closed"
I'm using rethinkdb with flask (python 3) that is hosted locally on a Windows machine.
The problem is that connection is being closed very frequently.
The error looks like this:
rethinkdb.errors....
0
votes
2
answers
317
views
Problem getting data from a Rethinkdb table in a specific order
The command "rdb.table('newnmeadata').orderBy('nos')" works fine in the RethinkDB data explorer. 'Nos' is the primary key. There are no problems with getting data (for a socket feed) using "....
0
votes
0
answers
131
views
Password hashing function in Flask with rethinkDB
I'm having trouble implementing hash/check_hash functions in flask with rethinkDB (using remodel ORM).
What I have coded I know can't work, but I'm not sure how to implement this, so that it will work....
-1
votes
1
answer
43
views
Updating nested JSON in array rethinkdb using Python
I want to filter with userid and update to groupuserlist in user_url data using python.pls help me.this is my following code
JSON
{
"channelname": "TEST1" ,
"groupuserlist": [
{
"userid": "...
0
votes
1
answer
440
views
AttributeError: module 'rethinkdb' has no attribute 'connect'
I am using the RethinkDB in my Jupyter Python Notebook.
I have installed the RethinkDB server for my Windows setup.
And server version is
C:\Users\rethinkdb-2.3.6>rethinkdb --version
rethinkdb 2....
2
votes
1
answer
85
views
How do I delete/update from nested document array
Given a document as below how can I delete or update from the nested document ingredients ? Any help, I am new to this rethinkdb. The table stores this documents called recipes.
[
{
"cook"...
1
vote
1
answer
95
views
Python unicode escape for RethinkDB match (regex) query
I am trying to perform a rethinkdb match query with an escaped unicode user provided search param:
import re
from rethinkdb import RethinkDB
r = RethinkDB()
search_value = u"\u05e5" # provided by ...
0
votes
1
answer
249
views
ReQL : Filtering Documents from Python List of Strings
I'd to like to filter a table with ReQL using a (Python) list of strings (variable number of values) applied on several fields, ie in the logic of more strings in the list more result is accurate. ...
0
votes
0
answers
71
views
Access RethinkDB database from LAN
I have 3 machines connected via LAN. I want to create RethinkDB database in one machine and access it from the other two machines via LAN. I am running Ubuntu Server 16.04 in a virtual machine in ...
0
votes
0
answers
144
views
Cannot "make" the RethinkDb from the source
I was trying to install RethinkDb on a fresh debian instance(from google cloud) which has around 1.7gb memory and 10gb storage. Everything till configure went great but i got this error while running ...
1
vote
1
answer
96
views
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 ...
1
vote
1
answer
186
views
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....
0
votes
1
answer
121
views
Rethinkdb: search a string in whole table (full text search like)
I'm writing a python flask application in combination with rethinkDB.
snippit structure:
{'Name': ['Gandalf', 'Jackson'], 'street': 'elmStreet'...}
This kind of structure is used multiple times, ...
1
vote
1
answer
184
views
Update a subdocument list object value in RethinkDB
{
"id": 1,
"subdocuments": [
{
"id": "A",
"name": 1
},
{
"id": "B",
"name": 2
},
{
"id": "C",...
0
votes
2
answers
917
views
How would I check if a filtered request returns an empty array?
I started Javascript around a year and a half ago but I started Python around a week ago so I'm still a beginner at this. So I'm trying to figure out if a user is already stored into the users table ...
0
votes
1
answer
50
views
Is there any builtin mechanism in rethinkdb to transform array of objects into key value?
I want to transform
[{"id": 1, "name": "some_name_1", "alias": "alias1"}, {"id": 2, "name": "some_name_2", alias: "alias2"}, {"id": 3, "name": "some_name_3", "alias": "alias3"}]
into
{"1": {"id": ...
0
votes
2
answers
83
views
Filter documents based on value of an attribute inside an array of objects
RethinkDB newb here and I can't figure this one out.
Lets say I have a table named mydata with documents that have the following basic structure:
{
"SomeAttirbute": "SomeValue",
"team": [
...
0
votes
1
answer
135
views
RethinkDB - Automatically generating primary keys that are linear
Is there a way to make rethinkdb generate primary key automatically and to ensure the key is in an increasing order., like say 1 to n
I know when we insert a row into rethinkdb it automatically ...
0
votes
1
answer
615
views
RethinkDB (Python) Change Feed - How to avoid blocking?
New to RethinkDB and want to make sure I'm getting this right.
Is a change feed in RethinkDb always blocking?
The following example is given in the docs (https://rethinkdb.com/docs/changefeeds/...
0
votes
2
answers
40
views
reformat string of index field when creating RethinkDB index
I am trying to create an index in RethinkDB.
The documents look like this:
{ "pinyin" : "a1 ai3"}
To make searching easier, I would like to preprocess the index entries and remove spaces and numbers, ...
4
votes
0
answers
1k
views
How do I configure a custom data store for Flask-Security?
I would like to use Flask-Security with RethinkDB, but I cannot get my custom RethinkDBUserDatastore to work properly. Below is the code I've created for the custom data store, plus the adapted ...
1
vote
1
answer
130
views
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" ...
1
vote
1
answer
520
views
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",
'...
1
vote
1
answer
386
views
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 "<stdin>", line 1, in <...
1
vote
0
answers
290
views
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 ...
0
votes
1
answer
371
views
Create multiple tables in same time on RethinkDB
I wrote a little script to create DB and some tables inside a RethinkDB if database don't exist.
I'm using the Python shell to communicate with RethinkDB
import rethinkdb as r
r.connect('localhost',...
0
votes
1
answer
223
views
Filtering a join based on foreign keys in list values in RethinkDB
I'm using RethinkDB (2.3.5~0trusty) and python (2.7.6) and python-rethinkdb
bindings (2.3.0.post6), and trying to query a pre-existing database.
(ie please assume I can't change the schema that I'm ...
0
votes
1
answer
89
views
Determine if field is an element of a set
Using RethinkDB's filter() function, given a field called field, how do we determine if field is an element of a set ['value1', 'value2'...'valueN'], and only filter rows where field is in such set?
...
1
vote
1
answer
98
views
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 & ...
1
vote
2
answers
185
views
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. ...
0
votes
1
answer
486
views
Sum two fields in a nested array in RethinkDB
The following document exists in a table in RethinkDB:
{
u'destination_addresses':[
u'1 Rockefeller Plaza,
New York,
NY 10020,
USA',
u'Meadowlands,
PA 15301,...
3
votes
1
answer
357
views
"rethinkdb.errors.ReqlServerCompileError: Expected 2 arguments but found 1 in:" when trying to .update() with Python rethink
I'm working with RethinkDB using the Python module and right now I'm trying to update a model with this statement:
results = rethink.table(model + "s").filter(id=results["id"]).update(data).run(g....
0
votes
1
answer
477
views
RethinkDB update field inside nested array->obj
Here is how my row looks like:
{"id": x ,
"data": [
{
"someId": 1 ,
"url": https://twitter.com/HillaryClinton?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor, »
} ,
{
"someId": 2 ...
0
votes
1
answer
51
views
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-...
0
votes
1
answer
73
views
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 ...