Forum Discussion

BrandedSaiyan's avatar
BrandedSaiyan
Advocate II
4 years ago
Solved

Possible to Query Keywords in SQL Statement Datasource Using API?

Hello Power BI Community, I recently gained access to the Power BI REST API. I was hoping there would be a way to do a keyword search on the SQL Statement that is part of part of a SQL Server data...
  • lbendlin's avatar
    lbendlin
    4 years ago

    You have to run it against each dataset (that you have access to) separately.  However you can sort of automate that by running the queries from PowerShell.

  • lbendlin's avatar
    lbendlin
    3 years ago
    Invoke-ASCmd -Server "powerbi://api.powerbi.com/v1.0/myorg/<workspace name here>" -Database "<dataset name here>" -Query "select * from `$SYSTEM.TMSCHEMA_PARTITIONS" | Out-File -FilePath c:\users\xxx\Downloads\dmv.xml