作者:桃园犬吠_207 | 来源:互联网 | 2022-12-06 12:08
如何解决《convertCsvfileintoXmlonAzuredatalakestoreusingAzurePowershellrunbook》经验,有好办法吗?
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 'AutomationCred'
$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"
直到这里的“ $ obj = Get”,此代码才能正常工作,但是我无法写入Azure数据湖。有什么方法可以使用Object在Azure数据湖中写入文件。