Questions tagged [reql]

ReQL is the RethinkDB query language. It offers a convenient way to manipulate JSON documents.

ReQL is the RethinkDB query language. It offers a convenient way to manipulate JSON documents.

http://www.rethinkdb.com/docs/introduction-to-reql/

99 questions
5
votes
1 answer

RethinkDB nested grouping

I have a RethinkDB table where documents look something like this: [ { "date": Mon Oct 05 2015 19:30:00 GMT+01:00, "category": 1, "name": "Alice" }, { "date": Wed Oct 07 2015 14:00:00 GMT+01:00, "category": 2, "name": "Ben" }, { "date": Mon…
5
votes
1 answer

Merge an Array of Documents in RethinkDB

Let's say I have a table called bookshelf. I create a bookshelf document that has an array of IDs that references books in another table called books. I am trying to use getAll and merge to combine the documents in a query but I cannot seem to be…
mark
  • 1,953
  • 1
  • 24
  • 47
5
votes
2 answers

Printing the response of a RethinkDB query in a reasonable way

I am participating in the Yelp Dataset Challenge and I'm using RethinkDB to store the JSON documents for each of the different datasets. I have the following script: import rethinkdb as r import json, os RDB_HOST = os.environ.get('RDB_HOST') or…
Arthur Collé
  • 2,541
  • 5
  • 27
  • 39
4
votes
2 answers

RethinkDB query based on multiple timestamps as secondary indices

I have a RethinkDB with a table 'events', each event has a 'from' and a 'to' column, both are timestamps. I want to mainly query this table by returning all events that are "active" in a time window, meaning the from column is before the end of the…
JoGr
  • 150
  • 1
  • 10
4
votes
1 answer

Why RethinkDB's count operation is so slow?

I am trying to benchmarking task for some queries in RethinkDB. I really did not get good answer of a question Why RethinkDB's count() operation is so slow? I have a query with 2GB of data: r.db("2GB").table("table").between(40, r.maxval,…
Prakash Thapa
  • 1,285
  • 14
  • 27
4
votes
1 answer

How to apply filter on array in ReQL in ReThinkDB using JavaScript

In the following JSON, I want to pick the records that have sales > 12500. How do I do that in ReThinkDB and ReQL? JSON is: { "address": { "address_line1": "Address Line 1" , "address_line2": "Address Line 2" , "city": "Kochin" , …
KAdditude
  • 83
  • 1
  • 3
3
votes
1 answer

Retrieve list of table names

I want to get the list of tables in a database. The documentation of the tableList command says this method returns a list of strings, but that is not exactly the case. It actually returns a TableList object. And when I…
Johannes
  • 828
  • 12
  • 29
3
votes
1 answer

How to find value of nested Value only field data in rethinkDB?

My first concatMap return something like following. I would like to get the value of "d" so the value will be "Rethinkdb" [ { "a":{ "b":{ "c":"NoSQL", "d":"Rethinkdb" …
Prakash Thapa
  • 1,285
  • 14
  • 27
2
votes
1 answer

Using secondary index for .lt() with .filter() in RethinkDB

Currently trying to solve a problem by using RethinkDB to find those objects which has a createdAt date key with less than the given value by using .lt(). The following query works just fine with .filter() and .lt(): r.db("databasename") …
norbitrial
  • 14,716
  • 7
  • 32
  • 59
2
votes
1 answer

ReQL | RethinkDB error: Expected type TABLE but found SINGLE_SELECTION

hello i have this in the data explorer on the webinterface but i have a error code: r.db("discordboatsclubv1").table("users").get("355995885085392896").insert({ "admin":"true" }) error: e: Expected type TABLE but found SINGLE_SELECTION: { …
2
votes
1 answer

How to update or insert an item in RethinkDB?

I am trying to update or insert (if it does not exist) an element in the database but so far I have not found any examples on how to use the Update and Filter provided by the C# Api.(C# Api , not RethinkDB Reql). Link to api :…
Bercovici Adrian
  • 8,794
  • 17
  • 73
  • 152
2
votes
1 answer

RethinkDB Query to Find Duplicate Email Addresses (records)

I have the following ReQL Query which Identifies distinct addresses, but can't seem to add the not() method to get the opposite. r.db('mydb').table('users').orderBy(r.desc('email')).without('id').distinct()
bbqchickenrobot
  • 3,592
  • 3
  • 45
  • 67
2
votes
1 answer

How to Update nested Array in RethinkDB using ReQL

I have a question on Updating the array in RethinkDB. My JSON structure looks like below. { "LOG_EVENT": { "ATTRIBUTES": [ { "ATTRIBUTE1": "TYPE", "VALUE": "ORDER" }, { …
Kumar Dev
  • 75
  • 7
2
votes
1 answer

RethinkDB windows installation

Hi had downloaded rethinkdb and run exe file but it is not connected while in browser but it is showing following in console Running rethinkdb 2.3.5-windows (MSC 190023506)... Running on 6.2.9200 (Windows 8, Server 2012) Loading data from…
Puneet Uppal
  • 195
  • 10
2
votes
1 answer

How to append to array only if it doesn't contain value with rethinkDB

I'd like to append a value to an array in a record that looks similar to the following: { _id: 'foo', cols: [ 'abc123', '123abc' ] } It's possible that this field doesn't exist and will need to be created prior to appending. I also…
hatch
  • 317
  • 1
  • 13
1
2 3 4 5 6 7