Commit b34101ba authored by litaolemo's avatar litaolemo

update

parent b22b9fb7
...@@ -111,11 +111,12 @@ for t in range(0, task_days): ...@@ -111,11 +111,12 @@ for t in range(0, task_days):
AND is_login_doctor = '1' AND is_login_doctor = '1'
)t2 )t2
ON t1.device_id = t2.device_id ON t1.device_id = t2.device_id
)t2 )t3
on t1.user_id=t2.user_id group by partition_date,device_id on t1.user_id=t3.user_id group by partition_date,device_id
""".format(today_str=today_str, yesterday_str=yesterday_str, ) """.format(today_str=today_str, yesterday_str=yesterday_str )
print(sql)
distinct_device_id_df = spark.sql(sql_distinct_device_id) distinct_device_id_df = spark.sql(sql_distinct_device_id)
distinct_device_id_df.show(1, False) distinct_device_id_df.show(1)
sql_res = distinct_device_id_df.collect() sql_res = distinct_device_id_df.collect()
for res in sql_res: for res in sql_res:
print(res) print(res)
......
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