Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
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.
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.
Hi @Anonymous
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
22 | |
2 | |
2 | |
2 | |
2 |