spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wush Wu <w...@bridgewell.com>
Subject Re: Extract hour from Timestamp in Spark SQL
Date Mon, 16 Feb 2015 14:25:08 GMT
Dear Cheng Hao,

You are right!

After using the HiveContext, the issue is solved.

Thanks,
Wush

2015-02-15 10:42 GMT+08:00 Cheng, Hao <hao.cheng@intel.com>:

>  Are you using the SQLContext? I think the HiveContext is recommended.
>
>
>
> Cheng Hao
>
>
>
> *From:* Wush Wu [mailto:wush@bridgewell.com]
> *Sent:* Thursday, February 12, 2015 2:24 PM
> *To:* user@spark.incubator.apache.org
> *Subject:* Extract hour from Timestamp in Spark SQL
>
>
>
> Dear all,
>
> I am new to Spark SQL and have no experience of Hive.
>
> I tried to use the built-in Hive Function to extract the hour from
> timestamp in spark sql, but got : "java.util.NoSuchElementException: key
> not found: hour"
>
> How should I extract the hour from timestamp?
>
> And I am very confusing about which functions I could use in Spark SQL. Is
> there any list of available functions except
> http://spark.apache.org/docs/1.2.0/sql-programming-guide.html#compatibility-with-apache-hive
> ?
>
> Thanks,
> Wush
>
>
>
>
>

Mime
View raw message