Check if you have permissions to root directory or not.
You may have to specify the complete directory path (for which you have 
permissions for) in the create view command.

For example:

0: jdbc:drill:zk=local> create view 
dfs.root.`/Users/ppenumarthy/parquet/test-view` as select * from 
dfs.root.`/Users/ppenumarthy/parquet/0_0_0.parquet`;
+-------+----------------------------------------------------------------------------------------+
|  ok   |                                        summary                        
                 |
+-------+----------------------------------------------------------------------------------------+
| true  | View '/Users/ppenumarthy/parquet/test-view' created successfully in 
'dfs.root' schema  |
+-------+----------------------------------------------------------------------------------------+
1 row selected (0.148 seconds)
0: jdbc:drill:zk=local>


Thanks
Padma

On Mar 1, 2018, at 11:37 AM, Erol Akarsu 
<[email protected]<mailto:[email protected]>> wrote:

Padma,

I have changed dfs storage plugin through web interface as below. But I am
getting same error response.

{
 "type": "file",
 "enabled": true,
 "connection": "file:///",
 "config": null,
 "workspaces": {
   "root": {
     "location": "/",
     "writable": true,
     "defaultInputFormat": null,
     "allowAccessOutsideWorkspace": true
   },
   "tmp": {
     "location": "/tmp",
     "writable": true,
     "defaultInputFormat": null,
     "allowAccessOutsideWorkspace": true
   }
 },

On Thu, Mar 1, 2018 at 1:15 PM, Padma Penumarthy 
<[email protected]<mailto:[email protected]>>
wrote:

Make "writable": true for the workspace (dfs.root) in the storage plugin
configuration.

Thanks
Padma


On Mar 1, 2018, at 10:10 AM, Erol Akarsu 
<[email protected]<mailto:[email protected]><mailto:eaka
[email protected]<mailto:[email protected]>>> wrote:

Thanks Padma.

I am getting problem while creating view

0: jdbc:drill:zk=local> create view mydonuts as SELECT * FROM
cp.`employee.json` LIMIT 3;
Error: VALIDATION ERROR: Root schema is immutable. Creating or dropping
tables/views is not allowed in root schema.Select a schema using 'USE
schema' command.


[Error Id: 68a31047-5a4e-4768-8722-55648d9a80f6 on DESKTOP-8OANV3A:31010]
(state=,code=0)
0: jdbc:drill:zk=local>

On Thu, Mar 1, 2018 at 12:49 PM, Padma Penumarthy 
<[email protected]<mailto:[email protected]>
<mailto:[email protected]>>
wrote:

Try creating a view and use describe.

https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.
apache.org_docs_describe_&d=DwIBaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=
XVqW14B9eGK9QR_fKKCb5H5LxKnqNMmq1U7RdNlhq1c&m=blTmu-WQJa5RUrxqG46o20B-a-
UP0yCHKGqcBo1ETlI&s=SxKqC4w_I5bbnNAtIvzO_9qptLP-KsHi0iIbjtzyrc8&e=

Thanks
Padma


On Mar 1, 2018, at 9:22 AM, Erol Akarsu 
<[email protected]<mailto:[email protected]><mailto:eaka
[email protected]<mailto:[email protected]>><mailto:eaka
[email protected]<mailto:[email protected]><mailto:[email protected]>>> wrote:

When Use limit 0 query,  I am getting only field names. I am looking for
json schema for input that will describe input type

0: jdbc:drill:> select * from `clicks/clicks.json` limit 0;

+-----------+-------+-------+------------+-------------+
| trans_id  | date  | time  | user_info  | trans_info  |
+-----------+-------+-------+------------+-------------+
+-----------+-------+-------+------------+-------------+
No

On Thu, Mar 1, 2018 at 11:24 AM, Erol Akarsu 
<[email protected]<mailto:[email protected]><mailto:
[email protected]<mailto:[email protected]>><mailto:
[email protected]<mailto:[email protected]><mailto:[email protected]>>> wrote:

I am sorry Sorabh
Can you give an example? I am still learning Drill
Thanks

On Thu, Mar 1, 2018 at 11:11 AM Sorabh Hamirwasia 
<[email protected]<mailto:[email protected]>
<mailto:[email protected]>
<mailto:[email protected]>>
wrote:

Hi Erol,

You can run limit 0 query from client to retrieve just the schema for
your input.


Thanks,
Sorabh

________________________________
From: Erol Akarsu 
<[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:
[email protected]<mailto:[email protected]>>>
Sent: Thursday, March 1, 2018 5:28:52 AM
To: 
[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:u
[email protected]<mailto:[email protected]>>
Subject: Accessing underlying scheme of input

I know Apache drill is creating a json schema for input data file or hdfs
input before user query on it.
I like to know whether or not Apache drill has API that will help user to
obtain that  derived schema for say an json file or excel file or hive
input.
I appreciate your help

Erol Akarsu

Sent from Mail for Windows 10

--

Erol Akarsu




--

Erol Akarsu




--

Erol Akarsu




--

Erol Akarsu

Reply via email to