Jan-08-2024, 12:09 PM
(This post was last modified: Jan-08-2024, 12:14 PM by deanhystad.)
Hi, I have one question , is possible to replace one thing on the script . I have the script. It works good, but i would like use text.sql intead of select tab.num from tabulka tab. Is it possible if yes how. I do not find any script, how can i solve this thanks. I use plsql developer
#run script # Import sqlalchemy's create_engine() function # Create the database engine engine = create_engine('oracle+cx_oracle://dw1:dw2@local/DW3') df = pd.read_sql(""" select tab.num from tabulka tab """,engine) df.head() #import data to table engine = create_engine('oracle+cx_oracle://dw1:dw2@local/DW3') df.to_sql('tt',con=engine,if_exists='append',index=False)
deanhystad write Jan-08-2024, 12:14 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.