Commit 0cea747f authored by 张彦钊's avatar 张彦钊

修改测试文件

parent d458f5e8
......@@ -198,8 +198,8 @@ def con_sql(db,sql):
def test():
sql = "select stat_date,cid_id,y,ccity_name from esmm_train_data limit 60"
rdd = spark.sql(sql).select("stat_date","cid_id","y","ccity_name").rdd
df = spark.createDataFrame(rdd).map(lambda x:(x[0],x[1],x[2],x[3]))
rdd = spark.sql(sql).select("stat_date","cid_id","y","ccity_name").rdd.map(lambda x:(x[0],x[1],x[2],x[3]))
df = spark.createDataFrame(rdd)
df.show(6)
from hdfs import InsecureClient
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment