1、代码:主要写入时表要为小写,否则报错

   Could not reflect: requested table(s) not available in Engine

from sqlalchemy import create_engine
conn_string='oracle+cx_oracle://admin:admin@192.168.923.147:1521/ORCL?charset=utf8'
engine = create_engine(conn_string, echo=False,encoding='utf-8') # ,encoding = "UTF-8", nencoding = "UTF-8"
print(engine)
data.to_sql('erp_goods_price', con=engine,if_exists='replace',index=False,chunksize=100) #,dtype='utf-8'
# result = pd.read_sql("SELECT GOODSID,GOODSNAME FROM DIM_ERP_PUB_GOODS",con=engine)
# print(result)

 

  

 

相关文章:

  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
  • 2021-06-15
  • 2022-12-23
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2021-07-31
  • 2021-09-04
  • 2022-12-23
  • 2021-10-21
  • 2021-11-03
相关资源
相似解决方案