marclelijveld / power-bi-automation Goto Github PK
View Code? Open in Web Editor NEWAutomate tasks in Power BI based on the Power BI Powershell cmdlets and the Power BI REST API
Automate tasks in Power BI based on the Power BI Powershell cmdlets and the Power BI REST API
I love this code. Thank you. It will fail if the data flow accesses native sql queries.
I updated function _getPowerBIDataflowDefinition
with this
if ($flowdefinition.'pbi:mashup'.'allowNativeQueries')
{
$flowdefinition.'pbi:mashup'.'allowNativeQueries'= $FALSE
}
== here is the code snippet
function getPowerBIDataflowDefinition([string] $GroupID, [string]$DataflowName) {
$url = [string]::Format("groups/{0}/dataflows", $GroupID);
$flowItems = Invoke-PowerBIRestMethod -Method GET -Url $url | ConvertFrom-Json
$flow = $flowItems.value | Where-Object { $.name -eq $DataflowName }
if ($flow) {
$url = [string]::Format("groups/{0}/dataflows/{1}", $GroupID, $flow.objectId);
$flowdefinition = Invoke-PowerBIRestMethod -Method GET -Url $url | ConvertFrom-Json
# check for allowNativeQueries
# "pbi:mashup": {
# "allowNativeQueries": false,
if ($flowdefinition.'pbi:mashup'.'allowNativeQueries')
{
$flowdefinition.'pbi:mashup'.'allowNativeQueries'= $FALSE
}
The reference for the Fullpath needs to be moved up in this script
$FolderName = "RefreshHistoryDump"
$OutputLocation = "c:"
$DatePrefix = Get-Date -Format "yyyyMMdd_HHmm"
# Create folder to dump results
$Fullpath = $OutputLocation + $FolderName
$DefaultFilePath = $Fullpath + "" + $DatePrefix + "" + $WorkspaceId + ""
I am looking for scripts to configure the on prem power bi gateway. Unable to find any docs or in built commands for automation.
Even tried doing it via pywinauto. But no luck.
Have you guys figured this out by any chance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.