here is an example of CTAS over a parquet file. (the parquet file is under /drill/testdata/join/typeall_l directory)
CREATE TABLE l_tblprtnby_intcl PARTITION BY( col_int ) AS SELECT * FROM dfs.`/drill/testdata/join/typeall_l`; On Thu, Dec 29, 2016 at 5:32 PM, Khurram Faraaz <[email protected]> wrote: > Please look at these examples on the documentation links below > > here is the link to supported datatypes in Drill - > https://drill.apache.org/docs/supported-data-types/ > > and link to CTAS in Drill - http://drill.apache.org/ > docs/create-table-as-ctas-command/ > > On Thu, Dec 29, 2016 at 4:40 PM, Manjeet Singh <[email protected] > > wrote: > >> Hi >> >> I am trying below query >> >> USE dfs; >> CREATE table dfs.`view_name`(AAA String, >> Domain String, >> certValidity String, >> protocol String, >> LastActive String, >> GetCount DOUBLE, >> PostCount DOUBLE, >> Data_Transfer DOUBLE, >> Data_Receive DOUBLE, >> Total_Communication DOUBLE, >> Last_Active String)AS SELECT AAA String, >> Domain String, >> certValidity String, >> protocol String, >> LastActive String, >> GetCount DOUBLE, >> PostCount DOUBLE, >> Data_Transfer DOUBLE, >> Data_Receive DOUBLE, >> Total_Communication DOUBLE, >> Last_Active String FROM >> dfs.`/Users/drilluser/apache-drill-1.0/sample-sata/nation.parquet`; >> >> >> >> still getting error >> >> can anyone suggest me what I am doing wrong >> second can anyone share how to create table over parquet file which is on >> hdfs? >> >> On Tue, Dec 27, 2016 at 2:52 AM, Ted Dunning <[email protected]> >> wrote: >> >> > On Sun, Dec 25, 2016 at 9:56 PM, Manjeet Singh < >> [email protected] >> > > >> > wrote: >> > >> > > CREATE TABLE 'ttttt'( >> > > "AAA", "Domain", "certValidity", "protocol", "LastActive", >> "GetCount", >> > > "PostCount", "Data_Transfer", "Data_Receive", "Total_Communication", >> > > "Last_Active") AS SELECT "AAA", "Domain", "certValidity", "protocol", >> > > "LastActive", "GetCount", "PostCount", "Data_Transfer", >> "Data_Receive", >> > > "Total_Communication", "Last_Active" FROM >> > > dfs."/user/Domain-1-_1481273732716/*"; >> > > >> > >> > You aren't specifying where your new table will be created. THis is >> > probably in dfs. You may also need to provide a workspace. For >> instance, >> > when I was creating a file this morning I used this: >> > >> > create table maprfs.ted.fooble as ... >> > >> > The parts of this table name are: >> > >> > maprfs - the storage >> > >> > ted - the workspace (aka my home directory) >> > >> > fooble - the table (no need for quotes for some kinds of names ... >> commonly >> > necessary, however) >> > >> > You have to make sure that your workspace allows writes. >> > >> >> >> >> -- >> luv all >> > >
