Page History
...
No Format |
---|
rddHotels.collect() |
Expand | ||
---|---|---|
| ||
SparkRDD 를 데이터셋으로
No Format |
---|
schema = StructType( [ StructField('hotelIdx',LongType(),True), StructField('discount',LongType(),True), StructField('name',StringType(),True) ]) dfHotels = sqlContext.createDataFrame(rddHotels, schema) |
Expand |
---|
데이터 셋을 통해 SQL문사용하기
No Format |
---|
dfHotels.createOrReplaceTempView('tblHotel') spark.sql('select * from tblHotel').collect() |
...