Regardless of the database in pspark or python (I would like you to let me know around mssql and postgreSQL), you need to insert or update coding for each row.
However, Spark does not support update, so it works as a Python library I'm going to check the pk value by row, and if there's none, I'm going to order INSERT, and if there is, I'm going to order UPDATE It's taking too long.Is there an efficient way?
python mssql python3 sql
If it is mssql, there is a MERGE
statement, but due to the nature of the work you are doing, it will never be efficient if you check each data is subject to UPDATE
.
Usually, INSERT is used only for INSERT, and UPDATE is handled in a lump later. INSERT is less expensive than UPDATE and less likely to cause a deadlock.
If you tell me to do this...
I think it's going to be either.
586 GDB gets version error when attempting to debug with the Presense SDK (IDE)
848 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
563 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
579 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.