1
votes

How to load .ps1 files from Azure Powershell to Azure data lake?

I have tried in my local machine (Powershell), there it is working fine.

while uploading it into the Azure Powershell, we are not able to fetch the exact location. And how do we create a file in Azure data lake using Azure Powershell?

1
What does we are not able to fetch the exact location mean? Is there any error information? If possible, please add the demo code.Tom Sun - MSFT
After uploading the file into azure data lake store,not able to find the directory where the file got saved and there is no error while uploading for .ps1 files from Azure cloud shell(PowerShell).And how to create a file in Azure data lake using Azure Power Shell?pythonUser

1 Answers

1
votes

If we want to create a file we could use Azure powershell command.

New-AzureRmDataLakeStoreItem -AccountName "AccountName" -Path "/NewFile.txt"

If we want to upload a local file to Azure data lake

Import-AzureRmDataLakeStoreItem -AccountName "ContosoADL" -Path "C:\SrcFile.csv" -Destination "/MyFiles/File.csv" -Concurrency 4

But before excute the command please make sure that you have permission to do that. How to assign the role to application or service principle, please refer to this tutorial.

For more Powershell command about data lake please refer to this document.