python做项目看板_三、使用python数据仓库实现可视化看板
1. 項(xiàng)目目的
實(shí)現(xiàn)自動(dòng)更新的可視化看板,滿足業(yè)務(wù)人員自主分析的需求
項(xiàng)目流程
2. 觀察
數(shù)據(jù)字典 cmd觀察數(shù)據(jù)庫(kù)中數(shù)據(jù)
3. Python加工
四、添加數(shù)據(jù)索引
create index index_date on dw_order_by_day_hjf(create_date(4));
用日期中的年份做索引
select * from dw_order_by_day_hjf where create_date='2019-02-11';
查看運(yùn)行時(shí)間
EXPLAIN select * from dw_order_by_day_hjf where create_date='2019-02-11';
查看索引執(zhí)行
五、服務(wù)器部署代碼,每日自動(dòng)更新
import schedule
import time
import datetime
import os
import requests
def job1:
os.system("/home/anaconda3/bin/python3 /home/frog005/adventure/dw_order_by_day.py >> /home/frog005/adventure/hjf_logs/dw_order_by_day_schedule.log 2>&1 &")
schedule.every().day.at('06:00').do(job1)
While True:
schedule.run_pending()
time.sleep(10)
nohup python3 auto_update.py > auto_update.log 2>&1 &
六、 Power BI可視化
https://app.powerbi.com/groups/me/reports/7cd16dfe-7a15-4bb5-bbd4-29276e061451?ctid=774cc712-a5e8-4fae-8722-8ba584159783
今日數(shù)據(jù) KPI
近期趨勢(shì)
今日訂單量
總結(jié)
以上是生活随笔為你收集整理的python做项目看板_三、使用python数据仓库实现可视化看板的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 为什么我们的软件不及印度
- 下一篇: python最基本的规则是什么_Pyth