[Python] pandas 의 to_sql 이용한 Bulk insert

 


pandas to_sql를 써서 bulk insert를 하는데

airflow에서 SIGKILL 발생해서 chunksize 추가해줌

chunksize = xx 를 설정해주면 pandas DataFrame 데이터를 xx row 개수 만큼 DB table 에 insert를 해줍니다. 설정해주지 않으면 pandas DataFrame을 통째로 한꺼번에 insert를 합니다.


[참고]

https://tzara.tistory.com/119

http://egloos.zum.com/haesaekju/v/6715680

댓글

이 블로그의 인기 게시물

[Eclipse] publishes and runs j2ee and java ee web projects and server configurations to a local tomcat server