python连接阿里云odps
生活随笔
收集整理的這篇文章主要介紹了
python连接阿里云odps
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?怎么下載他的庫這個就自行百度了,配置完畢之后就用以下代碼即可用python連接阿里云odps的數據庫了。
from odps import ODPS o = ODPS('嘿嘿嘿', #這個地方是阿里云的Access Key ID'哈哈哈哈', #這個地方是阿里云的Access Key Secret'kf_gdsw_xxzx',endpoint='http://service.cn-某個阿里云的網址:80/api')sql="""select *from 某個阿里云的數據庫;"""with o.execute_sql(sql).open_reader() as reader:for record in reader:print(record)#print(record.djxh)#sql_ora= "INSERT INTO t_tmp_nfdw_t values ('" + str(record.djxh) + "','" + str(record.nsrmc) + "')"#print(sql_ora)#cursor.execute(sql_ora)?
總結
以上是生活随笔為你收集整理的python连接阿里云odps的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用帆软finereport实现跳转的一
- 下一篇: python连接oracle