public void StreamRowToPowerBI(PBIRow row, string apiKey, PBIAPIClient powerBiAPI = null) { if (ParentDataset == null) { throw new Exception("Cannot add row to PowerBI table as the table is not linked to a DataSet in PowerBI!"); } if (powerBiAPI == null) { if (ParentDataset.ParentPowerBIAPI == null) { throw new Exception("No PowerBI API Object was supplied!"); } else { powerBiAPI = ParentDataset.ParentPowerBIAPI; } } PBIRows rows = new PBIRows(); rows.ParentTable = this; rows.Rows = new List <PBIRow>(1); rows.Rows.Add(row); StreamRowsToPowerBI(rows, apiKey, powerBiAPI); }
public void PushRowToPowerBI(PBIRow row, PBIAPIClient powerBiAPI = null) { PBIRows rows = new PBIRows(); rows.ParentTable = this; rows.Rows = new List <PBIRow>(1); rows.Rows.Add(row); PushRowsToPowerBI(rows, powerBiAPI); }
public void PushRowsToPowerBI(PBIRows rows, PBIAPIClient powerBiAPI = null) { if (DataRows == null) { DataRows = new List <PBIRow>(); } if (rows != null) { DataRows.AddRange(rows.Rows); } PushRowsToPowerBI(PBIJsonHelper.SerializeObject(DataRows), powerBiAPI); }
public void StreamRowsToPowerBI(PBIRows rows, string apiKey, PBIAPIClient powerBiAPI = null) { StreamRowsToPowerBI(rows.JSON, apiKey, powerBiAPI); }