Commit 1f12a545 authored by 郭羽's avatar 郭羽

test:export service ecpm data

parent bbcbfacf
...@@ -13,12 +13,13 @@ def getConn(): ...@@ -13,12 +13,13 @@ def getConn():
if __name__ == '__main__': if __name__ == '__main__':
sql = """ sql = """
select service_id,service_all_first_browse_num_d,service_all_preciseexpose_num_d,service_cpc_expend_recharge_amount_d select day_id,service_id,service_all_first_browse_num_d,service_all_preciseexpose_num_d,service_cpc_expend_recharge_amount_d
,service_add_cart_click_num_d,service_message_click_num_d,service_buy_click_num_d,service_validate_order_commission_non_doctor_d ,service_add_cart_click_num_d,service_message_click_num_d,service_buy_click_num_d,service_validate_order_commission_non_doctor_d
from sl_strategy_pt_sv_servicesmartrank_d from sl_strategy_pt_sv_servicesmartrank_d where day_id='20210711'
""" """
conn = getConn() conn = getConn()
df = pd.read_sql_query(sql,conn) df = pd.read_sql_query(sql,conn)
df.head(10); print(df.head(10))
print(df.count())
df.to_excel("ecpm_data.xlsx") df.to_excel("ecpm_data.xlsx")
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