public static void Main(string[] args) { ReadInData(DataSource); FlattenPopulateTables(); var pbi = new PowerBiAuthentication("007fb3ab-bf10-437b-9bea-1825f1086d00"); var dsClient = new DatasetsClient(pbi); var groupClient = new GroupClient(pbi); var group = groupClient.Get().Result.value.First(t => t.name == "ElastacoudPowerByTheHour"); //BufferedInsert<FlightInfoTableEntry>(dsClient, powerByTheHourDatasetId, flightTable); //BufferedInsert<PositionTableEntry>(dsClient, powerByTheHourDatasetId, positionTable); //BufferedInsert<SensorTableEntry>(dsClient, powerByTheHourDatasetId, sensorTable); try { string powerByTheHourDatasetId = CreateBIDataset(dsClient, group); BufferedInsert <FlattenedFlightInfoTableEntry>(dsClient, group, powerByTheHourDatasetId, flattenedFlightDictionary); } catch (Exception e) { Console.WriteLine(); } Console.WriteLine(); }
public async Task <ActionResult> Dash(string dashId) { var pbi = new PowerBiAuthentication(new powerbiWebToken()); var dashboardClient = new DashboardClient(pbi); var dashes = await dashboardClient.List(); ViewBag.dashes = dashes.value; ViewBag.accessToken = pbi.GetAccessToken(); var firstDash = dashes.value.First(d => d.id == dashId); var tiles = await dashboardClient.Tiles(firstDash.id); return(View("Index", model: tiles)); }