I want to convert CSV file into XML on Azure data lake store using Azure Powershell. I was using this code on Runbook of azure automation and it worked fine but No XML is being generated
$cred = Get-AutomationPSCredential -Name 'xyz'
$subscriptionName = 'Pay-As-You-Go'
$null = Add-AzureRmAccount -Credential $cred
Select-AzureRmSubscription -SubscriptionName $subscriptionName | Out-Null
$adla = "TestAzure"
$obj = Get-AzureRmDataLakeStoreItem -AccountName $adla -Path "/custom/logile/masters/Test/Test.csv"
$xmlobj = ConvertTo-Xml -InputObject $obj -As 'string'
$xmlobj | Out-File -FilePath "/custom/logile/masters/Test/xmlOut.xml"
This code is working fine till "$obj= Get" here, but I am not able to write into Azure data lake. Is there any way that I can use Object to write the file in Azure data lake.
Import-AzureRmDataLakeStoreItem
be used to upload the file? What are the contents of$obj
after the code runs? – AdminOfThings/custom/logile/masters/Test/
? – tukan