Re: Save DataFrame to Hive Table

2016-03-01 Thread Mich Talebzadeh
parquet4… > > I want to perform a union on all this parquet files. Is there any other > way of doing this different to DataFrame’s unionAll? > > > > Thank you very much in advance. > > > > Andres Fernandez > > > > *From:* Mich Talebzadeh [mailto:mich.talebza...@g

Re: Save DataFrame to Hive Table

2016-03-01 Thread Silvio Fiorito
gt;> Date: Tuesday, March 1, 2016 at 12:00 PM To: "user@spark.apache.org<mailto:user@spark.apache.org>" <user@spark.apache.org<mailto:user@spark.apache.org>> Subject: RE: Save DataFrame to Hive Table Good day colleagues. Quick question on Parquet and Dataframes. Ri

RE: Save DataFrame to Hive Table

2016-03-01 Thread Andres.Fernandez
DataFrame to Hive Table Hi It seems that your code is not specifying which database is your table created Try this scala> val HiveContext = new org.apache.spark.sql.hive.HiveContext(sc) scala> // Choose a database scala> HiveContext.sql("show databases").show scala> Hiv

Re: Save DataFrame to Hive Table

2016-03-01 Thread Mich Talebzadeh
Hi It seems that your code is not specifying which database is your table created Try this scala> val HiveContext = new org.apache.spark.sql.hive.HiveContext(sc) scala> // Choose a database scala> HiveContext.sql("show databases").show scala> HiveContext.sql("use test") // I chose test

Re: Save DataFrame to Hive Table

2016-02-29 Thread Jeff Zhang
The following line does not execute the sql so the table is not created. Add .show() at the end to execute the sql. hiveContext.sql("CREATE TABLE IF NOT EXISTS TableName (key INT, value STRING)") On Tue, Mar 1, 2016 at 2:22 PM, Yogesh Vyas wrote: > Hi, > > I have created

Save DataFrame to Hive Table

2016-02-29 Thread Yogesh Vyas
Hi, I have created a DataFrame in Spark, now I want to save it directly into the hive table. How to do it.? I have created the hive table using following hiveContext: HiveContext hiveContext = new org.apache.spark.sql.hive.HiveContext(sc.sc()); hiveContext.sql("CREATE TABLE IF NOT