------import_stock_d.py-----------------------------------
#!/usr/bin/python
import tushare as tsfile.close()
--------------------------------StockRun.sh------------------------------------------------------
python /home/cloudera/python/import_stock_d.py
hadoop fs -put /home/cloudera/data/data /stock
hive -e "LOAD DATA INPATH '/stock/data/*' OVERWRITE INTO TABLE import_stock_d";
hive -e "insert overwrite table import_stock_d select * from import_stock_d where turnover is not null"
sqoop export --table import_stock_d -connect jdbc:oracle:thin:@192.168.1.10:1521:orcl --username stock --password stock --export-dir '/user/hive/warehouse/import_stock_d/*' --input-fields-terminated-by ',' --input-lines-terminated-by '\n' --columns 'code,T_DATE,OPEN,HIGH,CLOSE,LOW,VOLUME,PRICE_CHANGE,P_CHANGE,MA5,MA10,MA20,V_MA5,V_MA10,V_MA20,TURNOVER'