sqlContext.table("tableName").schema()
On Wed, Feb 4, 2015 at 1:07 PM, Ayoub <[email protected]> wrote:
> Given a hive context you could execute:
> hiveContext.sql("describe TABLE_NAME") you would get the name of the
> fields and their types
>
> 2015-02-04 21:47 GMT+01:00 nitinkak001 <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=21502&i=0>>:
>
>> I want to get a Hive table schema details into Spark. Specifically, I
>> want to
>> get column name and type information. Is it possible to do it e.g using
>> JavaSchemaRDD or something else?
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-user-list.1001560.n3.nabble.com/How-to-get-Hive-table-schema-using-Spark-SQL-or-otherwise-tp21501.html
>> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=21502&i=1>
>> For additional commands, e-mail: [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=21502&i=2>
>>
>>
>
> ------------------------------
> View this message in context: Re: How to get Hive table schema using
> Spark SQL or otherwise
> <http://apache-spark-user-list.1001560.n3.nabble.com/Re-How-to-get-Hive-table-schema-using-Spark-SQL-or-otherwise-tp21502.html>
>
> Sent from the Apache Spark User List mailing list archive
> <http://apache-spark-user-list.1001560.n3.nabble.com/> at Nabble.com.
>