【背景:python萌新;hadoop、aws、spark體系】
record number:01
record time:20210610
1、python
1.1:pycharm
question:運行提示沒得當前模塊
處理:mac進終端,敲:pip install 模塊名,就可以import 參考了,
1.2:用python從mysql查詢,并匯出結果生成excel
question:報錯 out of range
處理:在mysql查詢到結果為空,所以顯示索引超出范圍,
tips:匯出前先看下有沒有值,
2、AWS體系(亞馬遜云平臺)
2.1 redshift資料庫建表陳述句
create table if not exists scheme. tablename(…);
comment table scheme.tablename is “備注”;
comment column scheme. tableblname. 欄位名 is “備注”;
(不支持建表時加注釋)
(不寫scheme.時,默認放在public下)
2.2同步資料:mysql to redshift
question報錯
處理 :
@點進報錯日志,報錯名,
@進redshift查詢(redshift會保留運行的情況),
select * from 報錯名 order by starttime desc;
(查詢最上面的幾行會顯示報錯error的詳細,such as:超過欄位所設定長度,修改欄位屬性)
tips:同步資料后,需要count下兩邊各表資料量是否一致,及檢查表結構(常規,但要仔細)
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/286989.html
標籤:其他
下一篇:Django-ORM-單表操作
