Skip to content

Commit ce8d116

Browse files
committed
Fixed bug in total rows written in Update/Refresh command.
1 parent d05bbbf commit ce8d116

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sqlbi.PbiPushDataset/PbiConnection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ public async Task<List<string>> ClearPushDataset( Guid groupId, Guid datasetId,
388388
List<object> rows = new List<object>();
389389
string tableName = string.Empty;
390390
string[] fieldNames = new string[reader.FieldCount];
391+
int totalRows = 0;
391392
// Prepare table and field names
392393
for (int col = 0; col < reader.FieldCount; col++)
393394
{
@@ -434,6 +435,7 @@ public async Task<List<string>> ClearPushDataset( Guid groupId, Guid datasetId,
434435
}
435436
}
436437
rows.Add(rowPushData);
438+
totalRows += rows.Count;
437439

438440
if (rows.Count >= MAX_ROWS_PER_POST)
439441
{
@@ -445,7 +447,7 @@ public async Task<List<string>> ClearPushDataset( Guid groupId, Guid datasetId,
445447
}
446448
refreshingTable?.Invoke(tableName, rows.Count);
447449
await _powerBIClient.Datasets.PostRowsInGroupAsync(groupId, datasetId.ToString(), tableName, new PostRowsRequest(rows));
448-
refreshedTables.Add((tableName,rows.Count));
450+
refreshedTables.Add((tableName, totalRows));
449451
} while (reader.NextResult());
450452

451453
return refreshedTables;

0 commit comments

Comments
 (0)