· 9 years ago · Dec 26, 2016, 08:22 PM
1import hiveContext.implicits._
2
3val productDF=hivecontext.sql("select * from productstorehtable2")
4println(productDF.show())
5
6create external table if not exists productstorehtable2
7(
8device string,
9date string,
10word string,
11count int
12)
13row format delimited fields terminated by ','
14location 'hdfs://quickstart.cloudera:8020/user/cloudera/hadoop/hive/warehouse/VerizonProduct2';