Questions tagged [rethinkdb-python]

Python driver for RethinkDB

128 questions
1
vote
1 answer

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" document while making use of a compound index with…
Kurt Peek
  • 34,968
  • 53
  • 191
  • 361
1
vote
1 answer

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", 'status': "SUCCESS" }, { 'appName':…
Sajani
  • 117
  • 8
1
vote
1 answer

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 "", line 1, in File…
Lone Ronin
  • 1,520
  • 13
  • 26
1
vote
0 answers

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 Linux, but there is no explanation for…
Philipp Hellmayr
  • 302
  • 1
  • 10
1
vote
1 answer

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 & rethinkdb_data from /var/lib/rethinkdb/default/data location. …
1
vote
2 answers

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. q = r.db('scanafi').table(active_table)…
user1513388
  • 6,151
  • 8
  • 52
  • 98
1
vote
1 answer

rethinkdb join: Cannot reduce over an empty stream

I have two simple tables: Users Table: { "activated": true , "created": Wed Jun 22 2016 15:22:32 GMT+00:00 , "email": email@email.com, » "id": "5071f620-576a-49c0-ae84-e9f32db2a034" , "roles": [ "Admin" ] , "sso": "123456789" } Roles…
ApathyBear
  • 6,991
  • 12
  • 48
  • 84
1
vote
1 answer

SQL to REQL how to?

I'm new to Reql and i'm trying to figure out how to transform my simple Sql request to Reql (i'm using python with rethinkdb) Select id, min(value), max(value), avg(value) From mytable Group by id Having timestamp between '2003-12-05T15:01:00.05Z'…
BitFlow
  • 37
  • 6
1
vote
1 answer

Rethinkdb multiple updates with conditional check

I've a little question about a rethinkdb request in python. I've a nested document like this: {'id': XX, 'markets_tracking': {'market_name_1': { 'latest_update': (timestamp), 'market_data': { 'type_1': {'place1': XX, 'place2': XX}, {'type_2':…
Matt
  • 3,549
  • 5
  • 32
  • 47
1
vote
1 answer

Feed Rethinkdb with scrapy

I'm looking for a simple tutorial explaining how to write items to Rethinkdb from scrapy. The equivalent can be found for MongoDB here.
1
vote
0 answers

rethinkdb: secondary compound indexes / aggregation queries and intermediate documents generation

Let's assume such table content where for the same product_id, we have as many rows than updates during status==1 (published) and finally status==0 (unpublished) and then becomes==2 (deleted) {id: , product_id: 1, last_updated: 2015-12-1,…
DevLounge
  • 7,345
  • 2
  • 26
  • 39
1
vote
1 answer

Nonblocking fetching of data with Tornado websockets and RethinkDB

When I receive a message from a client I want to run multiple RethinkDB queries in parallel and send the results the client immediately. The blocking way is below. A count can take minutes. I would like the other queries that would return faster to…
Tim Clemans
  • 176
  • 1
  • 7
1
vote
1 answer

python datetime.strftime() fails to stringify datetime object with RqlTzinfo

My fetched rows from rethinkdb cluster include date objects with timezones. Here's an example of one: ipython> dt datetime.datetime(2015, 12, 18, 0, 22, 4, 644000, tzinfo=) I'm trying to stringify…
Kludge
  • 2,305
  • 4
  • 18
  • 35
1
vote
1 answer

Rethinkdb multiple level grouping

Let's say I have a table with documents like: { "country": 1, "merchant": 2 "product": 123, ... } Is it possible to group all the documents into a final json structure like: [ { : { : { …
DevLounge
  • 7,345
  • 2
  • 26
  • 39
1
vote
0 answers

greater than equal condition for filtering nested json in rethinkdb doesn't work

I have below json rows 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 }, ], "dom": [ { "did": 7, "et": 2 } …
Satheesh Panduga
  • 779
  • 1
  • 8
  • 28
1 2
3
8 9