AnsweredAssumed Answered

0 Records Returned in Drill on MapR-DB Table

Question asked by john.humphreys on Jun 7, 2017
Latest reply on Jun 7, 2017 by cathy

Hello everyone, 

 

I created a MapR-DB table (JSON, but I'm not picky) with the below commands and selected two records from it to ensure it had data.  It does have data, but it does not show up when querying from Drill.

-bash-4.1$ mapr dbshell
====================================================
* MapR-DB Shell *
* NOTE: This is a shell for JSON table operations. *
====================================================
Version: 5.2.0-mapr

MapR-DB Shell
maprdb glpmpbd:> create /nmr/eis/sysm/pmp/work/dev/maprdb/drill-test
Table /nmr/eis/sysm/pmp/work/dev/maprdb/drill-test created.

maprdb glpmpbd:> insert /nmr/eis/sysm/pmp/work/dev/maprdb/drill-test --id "001" --value '{"first_name":"John", "last_name":"Humphreys", "age" : 30 }'
Document with id: "001" inserted.

maprdb glpmpbd:> findbyid /nmr/eis/sysm/pmp/work/dev/maprdb/drill-test --id 001
{"_id":"001","first_name":"John","last_name":"Humphreys","age":30}

 

When i try to look at the same data in Drill via JDBC, I get an empty result set:

-- show databases;
-- INFORMATION_SCHEMA
-- cp.default
-- dfs.default
-- dfs.maprdb
-- dfs.root
-- dfs.tmp
-- sys

-- use `dfs.maprdb`
-- show files;
-- ...
-- drill-test false true 2 glpmpbd pmpbatch r-------- 2017-05-26 14:13:44 2017-05-26 14:13:44
-- ...

select * from `drill-test`;

-- Output
-- 13:00:00 [SELECT - 0 rows, 0.083 secs] Empty result set fetched
-- ... 1 statement(s) executed, 0 rows affected, exec/fetch time: 0.083/0.051 sec [1 successful, 0 errors]

 

The file permissions look like this in case it matters.  I can't quite decipher that thing that looks like a symbolic link.

 

glpmpbd@psclxd00018(maprdb)$ ls -lah
total 605M
drwxr-xr-x 3 glpmpbd pmpbatch 10 May 30 12:50 .
drwxr-xr-x 19 glpmpbd pmpbatch 20 Jun 6 13:58 ..
lr-------- 1 glpmpbd pmpbatch 2 May 26 14:13 drill-test -> mapr::table::3909.16361.30739900

 

Have I made some kind of fundamental mistake here?

 

Thanks!

-John

Outcomes