You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Fredy Wijaya (JIRA)" <ji...@apache.org> on 2018/11/01 03:32:00 UTC

[jira] [Commented] (IMPALA-7797) impala-shell unable to run source commands within query file

    [ https://issues.apache.org/jira/browse/IMPALA-7797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16671067#comment-16671067 ] 

Fredy Wijaya commented on IMPALA-7797:
--------------------------------------

It's no longer an issue in the latest Impala.
{noformat}
$ cat query.sql 
select 1;
source test.sql;

$ cat test.sql 
select 2;

$ impala-shell.sh -f query.sql 
Server version: impalad version 3.1.0-SNAPSHOT DEBUG (build bf7bb58d0bbce971cda02dc4e6cfe9d359e43922)
Query: select 1
+---+
| 1 |
+---+
| 1 |
+---+
Fetched 1 row(s) in 0.11s
Query: select 2
+---+
| 2 |
+---+
| 2 |
+---+
Fetched 1 row(s) in 0.11s
{noformat}

> impala-shell unable to run source commands within query file
> ------------------------------------------------------------
>
>                 Key: IMPALA-7797
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7797
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 2.8.0
>            Reporter: Max Mitchell
>            Priority: Minor
>
> The impala shell isn't running `source` commands when they're contained within a query file.
> Here's an example SQL file. 
> {code:java}
> set var:x=0;
> source other_queries.sql;{code}
>  And the result is something like this.
> {code:java}
> Starting Impala Shell using Kerberos authentication
> Using service name 'impala'
> Connected to ...
> Server version: impalad version 2.8.0-cdh5.11.0 RELEASE (build e09660de6b503a15f07e84b99b63e8e745854c34)
> Variable X set to 0
> Query: source other_queries.sql
> Query submitted at: ... (Coordinator: ...)
> ERROR: AnalysisException: Syntax error in line ...:
> source other_queries.sql
> ^
> Encountered: IDENTIFIER
> Expected: ALTER, COMPUTE, CREATE, DELET...{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org