Commit cd51688b authored by 张彦钊's avatar 张彦钊

add

parent 48c068ba
......@@ -33,13 +33,16 @@ if __name__ == '__main__':
sql = "select partition_date from online.ml_community_precise_exposure_detail " \
"where action = 'page_precise_exposure' and page_name = 'search_result_welfare' " \
"AND partition_date='20190926' limit 20"
df = spark.sql(sql)
# df.show(6)
# params['exposure_cards'],
rdd = df.rdd.map(lambda x:x)
print(rdd.collect())
# df = spark.sql(sql)
# # df.show(6)
# # params['exposure_cards'],
# rdd = df.rdd.map(lambda x:x[0])
#
# print(rdd.collect())
#
# spark.createDataFrame(rdd).show(6)
rdd = sc.parallelize(["b", "a", "c"])
spark.createDataFrame(rdd).show(6)
......
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