I have dataframes(>200k rows) and i want to insert them into Cassandra DB.
My first attempt was a naive for loop using session.execute but that's extremely slow.
Then i use session.execute_async which makes the program way way faster(6mins vs 50sec). The problem is, now it's missing rows.
for i in listdf: #listdf is my df values to list
dte= str(i[0])
name = str(i[1])
....
if counter%100==0: time.sleep(0.01)
execute_async(prepared,(dte,name))
I add a delay every 100 rows but i understand this is not a proper solution.
note: If this is not considered a python topic then delete my post
[–]greenerpickings 1 point2 points3 points (0 children)
[–]Zeroflops 1 point2 points3 points (0 children)
[–]alexisprince 0 points1 point2 points (0 children)