The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
My requirement is to upload the PBIX file stored in Azure storage container to Power BI Service without downloading it to local drive
Normally we can upload the PBIX file by giving local path like below
Solved! Go to Solution.
Issue can be resolved by following my similar post in Azure platform
AnuragSingh-MSFT explained me clearly and resolved the issue
A basic understanding of Azure Automation runbook execution should help clarify this doubt. When runbooks are designed to authenticate and run against resources in Azure, they run in an Azure sandbox. Azure Automation assigns a worker to run each job during runbook execution in the sandbox. Please see this link for more details - Runbook execution environment These sandboxes are isolated environment with access to only some of t...
The following section should help answer the question - ... which path I have to use if the PBIX file is stored in Azure storage container and how the PowerShell script can be created?
The script snippet provided by Manu above would download the blob content in the same directory inside sandbox from where script is running. You can access this path inside the script using ".\" --> for example, if the blob that you are downloading is named testBlob, it will be available in location .\testBlob. (".\" stands for current directory).
Therefore, the pbixFilePath can be initialized as $pbixFilePath = ".\Test.pbix"
Another option is to use $env:temp as mentioned in the question. It is one of the environments variable available on local machine (on your workstation) which generally resolves to C:\Users\<username>\AppData\Local\Temp
In Azure Automation sandbox environment, this variable resolves to C:\Users\Client\Temp
Therefore, you could download the blob content using the following line:
In this case, you would initialize pbixFilePath as $pbixFilePath = $env:temp+"\Test.pbix"
Either case is fine as long as the Automation limits are not exceeded.
Hi @Sania198
I would first download the PBIX from the Azure storage to a local drive and then upload to the Power BI Service.
Thanks for your response @GilbertQ
I can't download the PBIX file to local drive and use it as I have to use the PowerShell script in Runbook Automation so it doesn't work in my scenario.
Also, I tried to list the blobs in the container with the Get-AzStorageBlob cmdlet and passed it as a path in above script and ended up with this error:
I don't know whether it is a correct way of acheiving my requirement but just tried it
If possible please help me with a sample PowerShell script to achieve the above requirement
Hi @Sania198
To me that looks like it might be a PowerShell Module that is missing?
I am sure that there might be a way to store Runbook outputs to a location, which you could then access to upload?
Hi @GilbertQ
I don't think it is a PowerShell Module issue, I crossed verified and every required Moudle is installed but I'm not sure
Even I feel the same, there might be a way to store Runbook outputs to a location but don't know which location we have to use, any idea?
There is no proper documentation regarding my ask either external or internal doc, it would be helpful if we can have one
Issue can be resolved by following my similar post in Azure platform
AnuragSingh-MSFT explained me clearly and resolved the issue
A basic understanding of Azure Automation runbook execution should help clarify this doubt. When runbooks are designed to authenticate and run against resources in Azure, they run in an Azure sandbox. Azure Automation assigns a worker to run each job during runbook execution in the sandbox. Please see this link for more details - Runbook execution environment These sandboxes are isolated environment with access to only some of t...
The following section should help answer the question - ... which path I have to use if the PBIX file is stored in Azure storage container and how the PowerShell script can be created?
The script snippet provided by Manu above would download the blob content in the same directory inside sandbox from where script is running. You can access this path inside the script using ".\" --> for example, if the blob that you are downloading is named testBlob, it will be available in location .\testBlob. (".\" stands for current directory).
Therefore, the pbixFilePath can be initialized as $pbixFilePath = ".\Test.pbix"
Another option is to use $env:temp as mentioned in the question. It is one of the environments variable available on local machine (on your workstation) which generally resolves to C:\Users\<username>\AppData\Local\Temp
In Azure Automation sandbox environment, this variable resolves to C:\Users\Client\Temp
Therefore, you could download the blob content using the following line:
In this case, you would initialize pbixFilePath as $pbixFilePath = $env:temp+"\Test.pbix"
Either case is fine as long as the Automation limits are not exceeded.