Giter VIP home page Giter VIP logo

Comments (2)

mayurvgajera2023 avatar mayurvgajera2023 commented on June 3, 2024

I think Microsoft has updated the mechanism to pull this data and someone needs to update the code.

from powerbirestapi.

migueesc123 avatar migueesc123 commented on June 3, 2024

I think Microsoft has updated the mechanism to pull this data and someone needs to update the code.

This doesn't appear to be the case. You can check their documentation:
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources

and then the lines of code at the connector level that do the calls:

[DataSource.Kind="PowerBIRESTAPI"]
PowerBIRESTAPI.DatasetDatasourcesAsAdmin = () =>
let
source = PowerBIRESTAPI.DatasetsAsAdmin(),
trimColumns = Table.SelectColumns(source,{"Dataset ID"}),
datasources = Table.AddColumn(trimColumns, "datasources", each try Table.FromRecords(Json.Document(Web.Contents( "https://api.powerbi.com/v1.0/myorg/admin/datasets/" & Text.From([Dataset ID])&"/datasources") )[value],{"datasourceType", "connectionDetails", "datasourceId", "gatewayId"},MissingField.UseNull) otherwise null ),
expandDatasources = Table.ExpandTableColumn(datasources, "datasources", {"datasourceType", "connectionDetails", "datasourceId", "gatewayId"}, {"Datasource Type", "connectionDetails", "Datasource ID", "Gateway ID"}),
filterNoRefreshables = Table.SelectRows(expandDatasources, each ([Datasource ID] <> null)),
expandConnectionDetails = Table.ExpandRecordColumn(filterNoRefreshables, "connectionDetails", {"path", "kind", "connectionString", "extensionDataSourceKind", "extensionDataSourcePath", "account", "domain", "server", "database", "sharePointSiteUrl", "url"}, {"path", "kind", "connectionString", "extensionDataSourceKind", "extensionDataSourcePath", "account", "domain", "server", "database", "sharePointSiteUrl", "url"}),
ServerAndDB = Table.AddColumn(expandConnectionDetails,"Server And Database", each [server]&" | "&[database]),
ExtensionFull = Table.AddColumn(ServerAndDB, "ExtensionFull", each [kind] & " | " & [path]),
ConnectionInfo = Table.AddColumn(ExtensionFull, "Connection Information", each if [Datasource Type] = "AnalysisServices" then [Server And Database]
else if [Datasource Type] = "ODBC" then [connectionString] else if [Datasource Type] = "Sql" then [Server And Database]
else if [Datasource Type] = "File" then [path]
else if [Datasource Type] = "ActiveDirectory" then [domain]
else if [Datasource Type] = "Folder" then [path]
else if [Datasource Type] = "Web" then [url]
else if [Datasource Type] = "MySql" then [Server And Database]
else if [Datasource Type] = "DB2" then [Server And Database]
else if [Datasource Type] = "OData" then [url]
else if [Datasource Type] = "SharePointList" then [url]
else if [Datasource Type] = "Extension" then [ExtensionFull]
else if [Datasource Type] = "Teradata" then [server]
else if [Datasource Type] = "Oracle" then [server]
else if [Datasource Type] = "Exchange" then [emailAddress]
else if [Datasource Type] = "OleDb" then [connectionString]
else if [Datasource Type] = "AzureBlobs" then [account]&" | "&[domain]
else "Requires Mapping"),
removeColumns = Table.SelectColumns(ConnectionInfo,{"Dataset ID", "Datasource ID", "Gateway ID", "Connection Information", "Datasource Type"}),
changeType = Table.TransformColumnTypes(removeColumns,{{"Datasource ID", type text}, {"Gateway ID", type text}, {"Connection Information", type text}, {"Datasource Type", type text}})
in
changeType;

I'd recommend checking what response you're getting from the REST API by using something like Fiddler to see the calls and responses at your network level, then seeing if perhaps there's an issue in terms of permissions to that endpoint.

If there isn't, and you're still seeing issues with that particular node - object, then please share the error message that you're getting when you try to run this table in Power BI Desktop and what query you're trying to evaluate.

from powerbirestapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.