simple join query does not work

87 views
Skip to first unread message

Chao Fang

unread,
May 19, 2017, 7:27:01 PM5/19/17
to SlamData-User

Hi, 
 I'm newcomer to slamdata. just write following query against mondodb 3.4.4.

SELECT b.name as A_NAME, c.c_name as B_CLASS_NAME from `/edb/obj` as b JOIN `/edb/class_obj` AS c ON c._id=b.classobjid

Here:
1. obj and class_obj are two collections undder same database edb.
2. SELECT b.name as A_NAME from `/edb/obj` as b    -----  works, return A_NAME column data
3. SELECT c.c_name as B_CLASS_NAME from `/edb/class_obj` AS c  ---- -----  works, return B_CLASS_NAME column data

always get error as below:

{
  "error": {
    "status": "Malformed SQL^2 query.",
    "detail": {
      "message": "operator '*' expected; but found `*** error: '!' expected but _ found'"
    }
  }
}

it looks slamdata does not support "c._id" as join condition..., but look at the slamdata document, it should work. anyone please help!

Damon LaCaille

unread,
May 20, 2017, 3:59:56 PM5/20/17
to SlamData-User
Hi Chao,

If you're using the 4.2 code base or newer, you may have to surround the _id field with back-ticks, like this:

....AS c ON c.`_id`=.....

Chao Fang

unread,
May 20, 2017, 8:32:32 PM5/20/17
to SlamData-User
Hi Damon,

Thanks for the reply.  Yes, I'm using latest slamdata 4.2.0. I did try your solution as below, but no luck, the new error message returned as following:

"  An unknown error ocurred: 500 ""  "

It even did very bad thing:  it destroyed mongodb mount info strangely and I'm no longer able to re-create mount again which I always get 

"  An unknown error ocurred: 500 ""  " ,  then I did remove slamdata software and re-install it, I still get get same error....  it looks like I have to re-install my ubuntu 16.10 again...

Anyway, Thank a lot!

Damon LaCaille

unread,
May 20, 2017, 11:10:51 PM5/20/17
to SlamData-User
Chao,

Sounds like a bug.  Please report an issue on the Quasar github repo here.  It sounds like something happened and the metastore was corrupted if you can no longer see your mount and cannot remount it either.

Any work you have done is still saved in a workspace in MongoDB, but the metastore probably needs cleaning up:

- Stop SlamData
- Remove the metastore DB file
- Restart SlamData
- Remount MongoDB in SlamData

The quasar-metastore db file is likely in $HOME/.config/quasar of the user who started SlamData.

Chao Fang

unread,
May 20, 2017, 11:52:07 PM5/20/17
to SlamData-User
issue just reported to Quasar. thanks again Damon.

mthun...@gmail.com

unread,
Jun 26, 2017, 6:37:46 AM6/26/17
to SlamData-User
Hi

 Was this issue resolved?

Im getting the same error :

do...@slamdata.com

unread,
Jun 26, 2017, 10:31:20 AM6/26/17
to SlamData-User, mthun...@gmail.com
The bug was fixed in Quasar 16.1.10. The newest release of SlamData 4.2.2 runs against Quasar 18.7.4. If you've got these versions of the different software and you're still experiencing issues, please include the full query here so we can better diagnose.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages