1

I have a MySQL table with a JSON column. I am able to write into this JSON field following either answer to this question, but I have not yet found a solution to be able to update the json field with the same method.

The solution I tried:

out_df.to_sql('my_table', my_sql_alchemy_engine, if_exists='append')

can go 2 ways:

  • if there are no unique keys in my table, the rows are simply added at the end of the table, with the JSON field containing only the values I wanted to make an update with
  • If there are unique fields, i get an IntegrityError

Is there any way to make that work, or should I find another solution to update my JSON fields ?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.