cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Can I return all datasets for a given on-premise gateway source server name?

Hi,

 

Due to now having hundreds of workspaces within my tenant, is it possible to use Powershell (or the likes) to return all datasets for a given on-premise gateway source server name? For example, list all datasets using the gateway server name "AdventureWorks" as it's source?

 

Thanks. 

3 REPLIES 3
Highlighted
Frequent Visitor

Re: Can I return all datasets for a given on-premise gateway source server name?

Yes!

 

Using the Power BI REST API, you could easily write a script using the following structure and APIs:

 

Get Groups

For Group in Groups:

   Get Datasets In Group

   for Dataset in Datasets

      Get Datasources In Group
      if Datasource contains AdventureWorks do somthing

This of course assumes that you have a user with access to all groups in the organisation. 

Let me know if this resolved your issue, or if you need further assistance.

Re: Can I return all datasets for a given on-premise gateway source server name?

Hi and thanks for your reply.

 

Do you have any online resources that show me the Powershell code for real world example so I can relate to the actual objects used within the code?

 

I can return all my gateway sources:

 

$GatewayClusterDatasources = ForEach ($GWCL in $GatewayClusters)
    {
        $GWCLID = $GWCL.Id
        Get-DataGatewayClusterDatasource -GatewayClusterId $GWCLID -ErrorAction SilentlyContinue |`
        Select-Object *,@{Name="DateRetrieved";Expression={$RetrieveDate}}

    }

 

But I can't related the above Id back to any workspace dataset source Id's?

 

Thanks,

 

Martin.

Highlighted
Super User I
Super User I

Re: Can I return all datasets for a given on-premise gateway source server name?

Hi @aspnet-scotland

 

I already tried this functionality and finally i found that there is no such API to query the list of all datasets for a given PowerBI Gateway.

 

So the direct answer is there is no such functioanlity so far. However you can create your feedback in Ideas.







Did my reply helpful to you ? Please give Kudos

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!