oracledb 链接数据库

import os
import oracledb
import sys
import pandas as pd
import numpy as np
import janitor
from sqlalchemy import create_engine,text

oracledb.init_oracle_client()

# engine = create_engine(
# f'oracle+oracledb://lxf:lxfXXK2023@192.168.30.48:1521/?service_name=JZDB1')

engine = create_engine(
f'oracle+oracledb://lxf:lxfXXK2023@',
connect_args={
"host": '192.168.30.48',
"port": 1521,
"service_name": 'JZDB1'
})

sqltxt='''
select * from IPVSDB.config_ymxx
'''

ymxx=(
pd.read_sql(text(sqltxt), con=engine.connect())
.clean_names()
)

评论

此博客中的热门博文

V2ray websocket(ws)+tls+nginx分流

Rstudio 使用代理