In Drill, a view is just a JSON file, which will live within the workspace
where you saved it. EG, if you do:

create or replace view dfs.workspace.myview as select * from mytable;

It will create a file called 'myview.view.drill' , which will look similar
to:

{
  "name" : "testview",
  "sql" : "SELECT *\nFROM `drill/new.json`\nFETCH NEXT 10 ROWS ONLY",
  "fields" : [ {
    "name" : "*",
    "type" : "ANY",
    "isNullable" : true
  } ],
  "workspaceSchemaPath" : [ "dfs", "workspace" ]
}

On Fri, Jun 26, 2015 at 5:14 AM, Vinupriyaa Muthusamypillai Ananthakrishna <
[email protected]> wrote:

> How can we get the Drill views definition. The sql for which the drill
> view is created.
>
>
>
> Thanks
> Vinupriyaa
>
>


-- 
 Andy Pernsteiner
 Manager, Field Enablement
ph: 206.228.0737

www.mapr.com

Now Available - Free Hadoop On-Demand Training
<http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available>

Reply via email to