drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andries Engelbrecht <aengelbre...@maprtech.com>
Subject Re: How to save output in any format
Date Tue, 06 Sep 2016 16:26:49 GMT
You may also look at using the storage plugins to create output by using CTAS.
You then need to set the session/system to use the appropriate storage format (store.format).
http://drill.apache.org/docs/configuration-options-introduction/ <http://drill.apache.org/docs/configuration-options-introduction/>

However in your case it is mostly limited to delimited text formats. (No excel, etc)
http://drill.apache.org/docs/data-sources-and-file-formats-introduction/ <http://drill.apache.org/docs/data-sources-and-file-formats-introduction/>


--Andries



> On Sep 6, 2016, at 9:19 AM, Abhishek Girish <abhishek.girish@gmail.com> wrote:
> 
> You can specify this using the outputformat option in sqlline.
> 
> sqlline> !record ~/output.csv
> sqlline> !outputformat csv
> 
> Another way I usually do is via sqlline variables and scripts.
> 
> 
> $DRILL_HOME/bin/sqlline -u jdbc:drill:zk=<IPAddr>:<port> --outputformat=csv
> < ~/input.sql > ~/output.csv
> 
> 
> On Tue, Sep 6, 2016 at 12:57 AM, <sanjivktr@yahoo.com.invalid> wrote:
> 
>> I am using drill in embedded mode in window having 1.8 version.
>> Suppose i have fire query :- select * from DemoSQLServer..Attribute; It
>> will return some output.
>> Now my question is :- Is it possible to save the output ?  I know in drill
>> documnet  !record  is there:- https://drill.apache.
>> org/docs/configuring-the-drill-shell/
>> While using record it will save the output in bin folder in file format.
>> But I want to save the output in any format  (e.g:- csv, txt, excel, etc)
>> and in any where (i.e:- in any directory or folder). OR:- Can i give file
>> extension(e.g:- csv, excel, txt, etc) and directory name( e.g:-
>> d://<someFolderName>) which i want to save the output in query itself.?
>> Is it Possible in Drill.? or any other option is there.?
>> 
>> Sent from Yahoo Mail. Get the app


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message