How to create a table in pyspark hive context

pyspark

#1

I have 3 tables in abc hive database with Avro format. I want to create the another database(def) and create those 3 tables in hivecontext pyspark through data frames. Can anyone help me out please.


Learn Spark 1.6.x or Spark 2.x on our state of the art big data labs

  • Click here for access to state of the art 13 node Hadoop and Spark Cluster


#2

More info: in abc database 3 tables all columns will b string but while I create it to def dAtabase those tables should be created with its respective columns.
Eg., abc database
Table1 —>name : string,id:string,dob:string

But in I want to create def database
Table 1 __>name: varchar,I’d:int, dob: timestamp

Please help me out . I need to do with dataframes hivecontext in pyspark.