Reply
Highlighted
sai
New Contributor
Posts: 1
Registered: ‎07-25-2018

Assigning a table name to a variable in HUE- Impala Editor

Hello,

 

I am trying to assighn table names to variable in Impala editor on HUE but it does not seem to work.

 

set var:table_name=production_table;

 

select * from ${var:table_name}

 

I get the below error, when I execute the below set statement.

 

set var:table_name=production_table;

 

  • AnalysisException: Syntax error in line 1:undefined: set var:table_name=production_table ^ Encountered: : Expected: ADD, AND, ARRAY, AS, ASC, BETWEEN, BIGINT, BINARY, BLOCK_SIZE, BOOLEAN, CACHED, CASCADE, CHANGE, CHAR, COMMENT, COMPRESSION, CROSS, DATE, DATETIME, DECIMAL, DEFAULT, DESC, DIV, REAL, DROP, ELSE, ENCODING, END, FLOAT, FOLLOWING, FROM, FULL, GROUP, IGNORE, HAVING, ILIKE, IN, INNER, INTEGER, IREGEXP, IS, JOIN, LEFT, LIKE, LIMIT, LOCATION, MAP, NOT, NULL, NULLS, OFFSET, ON, OR, ORDER, PARTITION, PARTITIONED, PRECEDING, PRIMARY, PURGE, RANGE, RECOVER, REGEXP, RENAME, REPLACE, RESTRICT, RIGHT, RLIKE, ROW, ROWS, SELECT, SET, SMALLINT, SORT, STORED, STRAIGHT_JOIN, STRING, STRUCT, TABLESAMPLE, TBLPROPERTIES, THEN, TIMESTAMP, TINYINT, TO, UNCACHED, UNION, USING, VALUES, VARCHAR, WHEN, WHERE, WITH, COMMA, IDENTIFIER CAUSED BY: Exception: Syntax error
  • Operation has no valid handle attached
Announcements