spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anusha Shamanur <anushas...@gmail.com>
Subject Re: TreeNodeException: Unresolved attributes
Date Wed, 04 Mar 2015 17:09:16 GMT
I tried. I still get the same error.

15/03/04 09:01:50 INFO parse.ParseDriver: Parsing command: select * from
TableName where value like '%Restaurant%'

15/03/04 09:01:50 INFO parse.ParseDriver: Parse Completed.

15/03/04 09:01:50 INFO metastore.HiveMetaStore: 0: get_table : db=default
tbl=TableName

15/03/04 09:01:50 INFO HiveMetaStore.audit: ugi=as7339
ip=unknown-ip-addr cmd=get_table
: db=default tbl=TableName
results: org.apache.spark.sql.SchemaRDD =

SchemaRDD[86] at RDD at SchemaRDD.scala:108
== Query Plan ==

== Physical Plan ==

org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Unresolved
attributes: *, tree:

'Project [*]

'Filter ('value LIKE Restaurant)
  MetastoreRelation default, TableName, None



On Wed, Mar 4, 2015 at 5:39 AM, Arush Kharbanda <arush@sigmoidanalytics.com>
wrote:

> Why don't you formulate a string before you pass it to the hql function
> (appending strings), and hql function is deprecated. You should use sql.
>
>
> http://spark.apache.org/docs/1.1.0/api/scala/index.html#org.apache.spark.sql.hive.HiveContext
>
> On Wed, Mar 4, 2015 at 6:15 AM, Anusha Shamanur <anushasb11@gmail.com>
> wrote:
>
>> Hi,
>>
>>
>> I am trying to run a simple select query on a table.
>>
>>
>> val restaurants=hiveCtx.hql("select * from TableName where column like
>> '%SomeString%' ")
>>
>> This gives an error as below:
>>
>> org.apache.spark.sql.catalyst.errors.package$TreeNodeException:
>> Unresolved attributes: *, tree:
>>
>> How do I solve this?
>>
>>
>> --
>> Regards,
>> Anusha
>>
>
>
>
> --
>
> [image: Sigmoid Analytics] <http://htmlsig.com/www.sigmoidanalytics.com>
>
> *Arush Kharbanda* || Technical Teamlead
>
> arush@sigmoidanalytics.com || www.sigmoidanalytics.com
>



-- 
Regards,
Anusha

Mime
View raw message