I have a table of 10000 rows loaded in dataframe.
The below code pushes these using patch method to another source. I do not want to execute & push all 10000 rows at the same time using below command. Rather I want the first 100 rows from the table to be executed and pushed first, then again the next 100, and so on till the end of the table in a loop. My table doesn't have any row number column. How can this be achieved in python as a loop.
batch = clientlink.create_batch()
changeset = clientlink.create_changeset()
for row in dfpatch.rdd.collect():
changeset.add_request(clientlink.entity_sets.cc.update_entity(obj=row.obj, method='PATCH').set(seg=row.segment))
print(row.obj,row.segment)
batch.add_request(changeset)
response = batch.execute()