Commit 13be0882 authored by 张彦钊's avatar 张彦钊

add

parent c5f139ad
......@@ -15,6 +15,8 @@ def ctr(x):
sum = sum + 1
return sum
def f(x):
print(x)
......@@ -34,10 +36,11 @@ if __name__ == '__main__':
df = spark.sql(sql)
# df.show(6)
# params['exposure_cards'],
rdd = df.rdd.map(lambda x:(x[0]))
print(rdd.collect())
rdd = df.rdd.map(lambda x:(x[0])).foreach(f)
spark.createDataFrame(rdd).show(6)
# print(rdd.collect())
# 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