You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by David Savage <da...@mac.com> on 2014/11/21 01:22:06 UTC
pipe output to file
Hi,
Is there a way to pipe the output from a drill query to a file? I tried using the record function in sqlline, which says it records output to file, but the file I specify is empty after I run a query.
David
Re: pipe output to file
Posted by Hao Zhu <hz...@maprtech.com>.
0: jdbc:drill:zk=local> !record /tmp/abc.txt
Saving all output to "/tmp/abc.txt". Enter "record" with no arguments to
stop it.
0: jdbc:drill:zk=local> show databases;
+-------------+
| SCHEMA_NAME |
+-------------+
| dfs.default |
| dfs.root |
| dfs.tmp |
| cp.default |
| sys |
| INFORMATION_SCHEMA |
+-------------+
6 rows selected (0.084 seconds)
0: jdbc:drill:zk=local> !record
Recording stopped.
0: jdbc:drill:zk=local> !quit
Closing: org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection
$ cat /tmp/abc.txt
Saving all output to "/tmp/abc.txt". Enter "record" with no arguments to
stop it.
+-------------+
| SCHEMA_NAME |
+-------------+
| dfs.default |
| dfs.root |
| dfs.tmp |
| cp.default |
| sys |
| INFORMATION_SCHEMA |
+-------------+
6 rows selected (0.084 seconds)
On Thu, Nov 20, 2014 at 4:22 PM, David Savage <da...@mac.com> wrote:
> Hi,
>
> Is there a way to pipe the output from a drill query to a file? I tried
> using the record function in sqlline, which says it records output to file,
> but the file I specify is empty after I run a query.
>
> David