Hi,

I tried to insert into a hive partitioned table

val ZONE: Int = Integer.valueOf(args(2))
val MONTH: Int = Integer.valueOf(args(3))
val YEAR: Int = Integer.valueOf(args(4))

val weightedUVToDF = weightedUVToRecord.toDF()
weightedUVToDF.registerTempTable("speeddata")
hiveContext.sql("INSERT OVERWRITE table speed partition (year=" + YEAR + ",month=" + MONTH + ",zone=" + ZONE + ")
    select key, speed, direction from speeddata")

First I registered a temporary table "speeddata". The value of the partitioned column (year, month, zone) is from user input. If I would like to get the value of the partitioned column from the temporary table, how can I do that?

BR,
Patcharee

Reply via email to