0

Unable to send data from pandas (Dataframe) to oracle database.

engine = create_engine('oracle+cx_oracle://username:password@localhost')
    
        dataset.to_sql(
            name='table_name',
            con=engine,
            if_exists='append',
            index=False
        )
  • you need to specify your schema i.e `name='customer', schema='dim'` – Umar.H Sep 25 '20 at 10:19
  • so customer is table name and schema is your schema name right? and where should i write this code in create_engine or dataset,to_sql? –  Sep 25 '20 at 10:26
  • see [here](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_sql.html) in the documentation, it has all you need. – Umar.H Sep 25 '20 at 10:49
  • when you say 'unable to send...', you mean you get an error? you cannot find your data afterwards? ....If you get an error, what is it? – gsalem Sep 25 '20 at 11:18
  • It's taking too much time to upload i think. –  Sep 25 '20 at 11:48

0 Answers0