none
New-AzureRmDataLakeStoreItem : Error in getting metadata for path -PowerShell

    Question

  • Hi,

    I need to create multiple directories in the Azure Data lake stored and kept all my directory names in CSV and trying to import from CSV into my script and passing directory name to New-AzureRMDataLakeStoreItem. Here are the scripts

    Login-AzureRmAccount;$dataLakeStoreName = 'data****'$rootfolder='/Landing/AMI/RAW';$csv = Import-Csv "C:\eventDetails.csv";foreach ($line in $csv){ $eventype= $line.EventTypeNew-AzureRmDataLakeStoreItem -Folder -Account $dataLakeStoreName -Path $rootfolder/$eventype;}


    I am getting below error.

    New-AzureRmDataLakeStoreItem : Error in getting metadata for path /Landing/AMI/RAW/test1.Operation: GETFILESTATUS failed with HttpStatus:BadRequest Error: Unexpected error in JSON parsing.

    I have no clue what is an issue is. I can able create a directory like below format, But I cannot create around 50 folders manually. thus, I kept all the folder names in CSV for my easy deployment.

    New-AzureRmDataLakeStoreItem -Folder -Account $dataLakeStoreName -Path $rootfolder/test

    Thanks

    Lalith

    Thursday, July 5, 2018 8:43 PM

All replies