I don't know if show files makes sense in the case of hive storage.

Regards
Ramana

On Saturday, May 10, 2014, George Chow (JIRA) <[email protected]> wrote:

>
>     [
> https://issues.apache.org/jira/browse/DRILL-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994435#comment-13994435]
>
> George Chow commented on DRILL-601:
> -----------------------------------
>
> If I start sqlline as follows:
>
> {code}
> sqlline -u jdbc:drill:zk=local -n admin -p admin
> {code}
>
> show files works.
>
> However, an alternate startup such as:
>
> {code}
> sqlline -u jdbc:drill:schema=hivestg;zk=local -n admin -p admin
> {code}
>
> fails with the following error:
>
> {code}
> 0: jdbc:drill:schema=hivestg> show files from dfs.`/tmp`;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while
> running query.[error_id: "f143a021-1e58-4939-a61c-0c6a6732fbe0"
> endpoint {
>   address: "localhost"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < SqlParseException:[ Encountered
> "show files" at line 1, column 1.
> Was expecting one of:
>     "ALTER" ...
>     "WITH" ...
>     "+" ...
>     "-" ...
>     <UNSIGNED_INTEGER_LITERAL> ...
>     <DECIMAL_NUMERIC_LITERAL> ...
>     <APPROX_NUMERIC_LITERAL> ...
>     <BINARY_STRING_LITERAL> ...
>     <PREFIXED_STRING_LITERAL> ...
>     <QUOTED_STRING> ...
>     <UNICODE_STRING_LITERAL> ...
>  {code}
>
>
> > Need a SHOW FILES query to allow browsing of the file system.
> > --------------------------------------------------------------
> >
> >                 Key: DRILL-601
> >                 URL: https://issues.apache.org/jira/browse/DRILL-601
> >             Project: Apache Drill
> >          Issue Type: New Feature
> >            Reporter: Parth Chandra
> >            Assignee: Mehant Baid
> >         Attachments: DRILL-601.patch
> >
> >
> > SHOW FILES [{FROM | IN} db_name] [LIKE 'pattern' | WHERE expr]
> >
> > Where -
> >     db_name is schema name.
> >     pattern is path with wildcards . The wildcard character is ‘%’
> >     where are other conditions.
> > Example:
> > SHOW FILES IN dfs.`/myfiles/logs` LIKE 'happy%' WHERE isDirectory = true;
> > The columns returned are
> > name  VARCHAR
> > isDirectory   BOOLEAN
> > isFile        BOOLEAN
> > isSymlink     BOOLEAN
> > length        BIGINT
> > owner VARCHAR
> > group VARCHAR
> > modificationTime      TIMESTAMP
> > accessTime    TIMESTAMP
> > permissions   VARCHAR
> > The syntax mirrors the show tables command
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.2#6252)
>

Reply via email to