Skip to content

Commit 7f993b2

Browse files
Merge pull request #61 from domoinc/ds-update-dropping-data
fix to upload all chunks
2 parents de42312 + d322e3c commit 7f993b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pydomo/utilities/UtilitiesClient.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ def stream_upload(self, ds_id, df_up, warn_schema_change=True):
7878
if df_rows > chunksz:
7979
end = chunksz
8080

81-
while end <= df_rows:
81+
for i in range(math.ceil(df_rows/chunksz)):
8282
df_sub = df_up.iloc[start:end, ]
8383
csv = df_sub.to_csv(header=False,index=False)
8484
self.stream.upload_part(stream_id, exec_id, start, csv)
8585
start = end
8686
end = end + chunksz
87+
if end > df_rows:
88+
end = df_rows
8789

8890
result = self.stream.commit_execution(stream_id, exec_id)
8991

0 commit comments

Comments
 (0)