加入python部分脚本
This commit is contained in:
25
code/python/车商渠道数据采集/DataManagement/CarDealer.py
Normal file
25
code/python/车商渠道数据采集/DataManagement/CarDealer.py
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
import sys;
|
||||
import cx_Oracle;
|
||||
|
||||
def getConnectString( user_name, password, db_name ):
|
||||
return userName + "/" + password + "@" + dbName
|
||||
|
||||
sql = \
|
||||
"select * \n" \
|
||||
" from idst0.rydm_t"
|
||||
|
||||
userName = "dataex"
|
||||
password = "cpic123456"
|
||||
dbName = "10.39.0.86/xmcx1"
|
||||
|
||||
conn = cx_Oracle.connect( getConnectString(userName,password,dbName) )
|
||||
|
||||
curs = conn.cursor()
|
||||
result = curs.execute(sql)
|
||||
row = curs.fetchone()
|
||||
print( row )
|
||||
|
||||
curs.close()
|
||||
conn.close()
|
||||
|
0
code/python/车商渠道数据采集/DataManagement/__init__.py
Normal file
0
code/python/车商渠道数据采集/DataManagement/__init__.py
Normal file
Reference in New Issue
Block a user