Get-AzDataFactoryV2Dataset : Can not convert Object to String.
Description
Get-AzDataFactoryV2Dataset fails to retrieve the information of a specific DATASET, and fails with error "Get-AzDataFactoryV2Dataset : Can not convert Object to String."
Steps to reproduce
- Open Azure Datafactory
- Create a dataset - Binary over Azure ADLS Storage
- In the "Compression Type": use "add dynamic content" and try to pick a parameter as input (attached a sample json)
- Save and Publish the Data Set
- Now try to run the Get-AzDataFactoryV2Dataset -ResourceGroupName "$ResourceGroupName" -DataFactoryName "$FactoryName"
- You will see the error
Get-AzDataFactoryV2Dataset -ResourceGroupName "$ResourceGroupName" -DataFactoryName "$FactoryName"
Environment data
Name Value
---- -----
PSVersion 5.1.17134.858
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.858
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.9.1 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script 1.1.1 Az.Advisor {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendati...
Script 1.1.3 Az.Aks {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredentia...
Script 1.1.4 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServic...
Script 2.0.1 Az.ApiManagement {Add-AzApiManagementApiToProduct, Add-AzApiManagementProdu...
Script 1.1.0 Az.ApplicationInsights {Get-AzApplicationInsights, New-AzApplicationInsights, Rem...
Script 1.3.7 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script 3.1.0 Az.Batch {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAcc...
Script 1.0.3 Az.Billing {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollme...
Script 1.4.3 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfil...
Script 1.5.0 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAc...
Script 4.2.1 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script 1.0.3 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzCont...
Script 1.1.1 Az.ContainerRegistry {New-AzContainerRegistry, Get-AzContainerRegistry, Update-...
Script 1.1.0 Az.DataBoxEdge {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzD...
Script 1.9.0 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFa...
Script 1.0.2 Az.DataLakeAnalytics {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalytic...
Script 1.2.8 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script 1.0.0 Az.DataShare {New-AzDataShareAccount, Get-AzDataShareAccount, Remove-Az...
Script 1.1.0 Az.DeploymentManager {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentMa...
Script 1.0.0 Az.DesktopVirtualization {Disconnect-AzWvdUserSession, Get-AzWvdApplication, Get-Az...
Script 1.0.2 Az.DevTestLabs {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolic...
Script 1.1.2 Az.Dns {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRe...
Script 1.3.0 Az.EventGrid {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGr...
Script 1.5.0 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzE...
Script 1.6.0 Az.FrontDoor {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove...
Script 1.0.1 Az.Functions {Get-AzFunctionApp, Get-AzFunctionAppAvailableLocation, Ge...
Script 3.3.1 Az.HDInsight {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wa...
Script 1.1.0 Az.HealthcareApis {New-AzHealthcareApisService, Remove-AzHealthcareApisServi...
Script 2.5.0 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-A...
Script 2.0.0 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, ...
Script 1.3.2 Az.LogicApp {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccou...
Script 2.3.0 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-...
Script 2.3.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script 0.5.4 Azure.AnalysisServices {Add-AzureAnalysisServicesAccount, Restart-AzureAnalysisSe...
Script 4.6.1 Azure.Storage {Get-AzureStorageTable, New-AzureStorageTableSASToken, New...
Script 6.13.1 AzureRM
Script 0.6.14 AzureRM.AnalysisServices {Resume-AzureRmAnalysisServicesServer, Suspend-AzureRmAnal...
Script 6.1.7 AzureRM.ApiManagement {Add-AzureRmApiManagementRegion, Get-AzureRmApiManagementS...
Script 0.1.8 AzureRM.ApplicationInsights {Get-AzureRmApplicationInsights, New-AzureRmApplicationIns...
Script 6.1.1 AzureRM.Automation {Get-AzureRMAutomationHybridWorkerGroup, Remove-AzureRmAut...
Script 4.0.11 AzureRM.Backup {Backup-AzureRmBackupItem, Enable-AzureRmBackupContainerRe...
Script 4.1.5 AzureRM.Batch {Remove-AzureRmBatchAccount, Get-AzureRmBatchAccount, Get-...
Script 0.14.6 AzureRM.Billing {Get-AzureRmBillingInvoice, Get-AzureRmBillingPeriod, Get-...
Script 5.0.6 AzureRM.Cdn {Get-AzureRmCdnProfile, Get-AzureRmCdnProfileSsoUrl, New-A...
Script 0.9.12 AzureRM.CognitiveServices {Get-AzureRmCognitiveServicesAccount, Get-AzureRmCognitive...
Script 5.9.1 AzureRM.Compute {Remove-AzureRmAvailabilitySet, Get-AzureRmAvailabilitySet...
Script 0.3.7 AzureRM.Consumption {Get-AzureRmConsumptionBudget, Get-AzureRmConsumptionMarke...
Script 0.2.12 AzureRM.ContainerInstance {New-AzureRmContainerGroup, Get-AzureRmContainerGroup, Rem...
Script 1.0.10 AzureRM.ContainerRegistry {New-AzureRmContainerRegistry, Get-AzureRmContainerRegistr...
Script 5.0.3 AzureRM.DataFactories {Remove-AzureRmDataFactory, Get-AzureRmDataFactoryRun, Get...
Script 0.5.11 AzureRM.DataFactoryV2 {Set-AzureRmDataFactoryV2, Update-AzureRmDataFactoryV2, Ge...
Script 5.1.4 AzureRM.DataLakeAnalytics {Get-AzureRmDataLakeAnalyticsDataSource, New-AzureRmDataLa...
Script 6.2.1 AzureRM.DataLakeStore {Get-AzureRmDataLakeStoreTrustedIdProvider, Remove-AzureRm...
Script 4.0.9 AzureRM.DevTestLabs {Get-AzureRmDtlAllowedVMSizesPolicy, Get-AzureRmDtlAutoShu...
Script 5.1.0 AzureRM.Dns {Get-AzureRmDnsRecordSet, New-AzureRmDnsRecordConfig, Remo...
Script 0.3.7 AzureRM.EventGrid {New-AzureRmEventGridTopic, Get-AzureRmEventGridTopic, Set...
Script 0.7.0 AzureRM.EventHub {New-AzureRmEventHubNamespace, Get-AzureRmEventHubNamespac...
Script 4.1.8 AzureRM.HDInsight {Get-AzureRmHDInsightJob, New-AzureRmHDInsightSqoopJobDefi...
Script 5.1.5 AzureRM.Insights {Get-AzureRmMetricDefinition, Get-AzureRmMetric, Remove-Az...
Script 3.1.8 AzureRM.IotHub {Add-AzureRmIotHubKey, Get-AzureRmIotHubEventHubConsumerGr...
Script 5.2.1 AzureRM.KeyVault {Add-AzureKeyVaultCertificate, Update-AzureKeyVaultCertifi...
Script 4.1.4 AzureRM.LogicApp {Get-AzureRmIntegrationAccountAgreement, Get-AzureRmIntegr...
Script 0.18.5 AzureRM.MachineLearning {Move-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitm...
Script 0.4.8 AzureRM.MachineLearningCompute {Get-AzureRmMlOpCluster, Get-AzureRmMlOpClusterKey, Test-A...
Script 0.2.7 AzureRM.MarketplaceOrdering {Get-AzureRmMarketplaceTerms, Set-AzureRmMarketplaceTerms}
Script 0.10.4 AzureRM.Media {Sync-AzureRmMediaServiceStorageKeys, Set-AzureRmMediaServ...
Script 6.11.1 AzureRM.Network {Add-AzureRmApplicationGatewayAuthenticationCertificate, G...
Script 5.0.3 AzureRM.NotificationHubs {Get-AzureRmNotificationHub, Get-AzureRmNotificationHubAut...
Script 5.0.6 AzureRM.OperationalInsights {New-AzureRmOperationalInsightsAzureActivityLogDataSource,...
Script 1.1.0 AzureRM.PolicyInsights {Get-AzureRmPolicyEvent, Get-AzureRmPolicyState, Get-Azure...
Script 4.1.10 AzureRM.PowerBIEmbedded {Remove-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPowe...
Script 5.8.2 AzureRM.profile {Disable-AzureRmDataCollection, Disable-AzureRmContextAuto...
Script 4.1.9 AzureRM.RecoveryServices {Get-AzureRmRecoveryServicesBackupProperty, Get-AzureRmRec...
Script 4.5.2 AzureRM.RecoveryServices.Backup {Backup-AzureRmRecoveryServicesBackupItem, Get-AzureRmReco...
Script 0.2.12 AzureRM.RecoveryServices.SiteRec... {Edit-AzureRmRecoveryServicesAsrRecoveryPlan, Get-AzureRmR...
Script 5.1.0 AzureRM.RedisCache {Remove-AzureRmRedisCachePatchSchedule, New-AzureRmRedisCa...
Script 0.3.12 AzureRM.Relay {New-AzureRmRelayNamespace, Get-AzureRmRelayNamespace, Set...
Script 6.7.3 AzureRM.Resources {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignmen...
Script 0.16.10 AzureRM.Scheduler {Disable-AzureRmSchedulerJobCollection, Enable-AzureRmSche...
Script 0.6.13 AzureRM.ServiceBus {New-AzureRmServiceBusNamespace, Get-AzureRmServiceBusName...
Script 0.3.15 AzureRM.ServiceFabric {Add-AzureRmServiceFabricApplicationCertificate, Add-Azure...
Script 1.0.0 AzureRM.SignalR {New-AzureRmSignalR, Get-AzureRmSignalR, Get-AzureRmSignal...
Script 4.12.1 AzureRM.Sql {Get-AzureRmSqlDatabaseTransparentDataEncryption, Get-Azur...
Script 5.2.0 AzureRM.Storage {Get-AzureRmStorageAccount, Get-AzureRmStorageAccountKey, ...
Script 4.0.10 AzureRM.StreamAnalytics {Get-AzureRmStreamAnalyticsFunction, Get-AzureRmStreamAnal...
Script 4.0.5 AzureRM.Tags {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}
Script 4.1.3 AzureRM.TrafficManager {Add-AzureRmTrafficManagerCustomHeaderToEndpoint, Remove-A...
Script 4.0.5 AzureRM.UsageAggregates Get-UsageAggregates
Script 5.2.0 AzureRM.Websites {Get-AzureRmAppServicePlan, Set-AzureRmAppServicePlan, New...
Script 1.0.1 Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script 3.4.0 Pester {Describe, Context, It, Should...}
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remov...
Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.0.0.0 AppBackgroundTask {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgro...
Manifest 2.0.0.0 AppLocker {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-Ap...
Manifest 1.0.0.0 AppvClient {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add...
Manifest 2.0.0.0 Appx {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest...
Script 1.0.0.0 AssignedAccess {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAcc...
Manifest 1.0.0.0 BitLocker {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Re...
Manifest 2.0.0.0 BitsTransfer {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re...
Manifest 1.0.0.0 BranchCache {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disa...
Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,...
Manifest 1.0 ConfigCI {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIP...
Manifest 1.0 Defender {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest 1.0.0.0 DeliveryOptimization {Get-DeliveryOptimizationStatus, Get-DeliveryOptimizationP...
Manifest 1.0.0.0 DirectAccessClientComponents {Disable-DAManualEntryPointSelection, Enable-DAManualEntry...
Script 3.0 Dism {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window...
Manifest 1.0.0.0 DnsClient {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get...
Manifest 1.0.0.0 EventTracingManagement {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceS...
Manifest 1.0.0.0 HgsClient {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfigurat...
Manifest 1.0.0.0 HgsDiagnostics {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, T...
Binary 1.0.0.0 HostComputeService {Get-ComputeProcess, Stop-ComputeProcess}
Manifest 1.0.0.0 HostNetworkingService {Remove-HnsNamespace, Remove-HnsEndpoint, Get-HnsEndpoint,...
Binary 2.0.0.0 Hyper-V {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChanne...
Binary 1.1 Hyper-V {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDriv...
Manifest 2.0.0.0 International {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet...
Manifest 1.0.0.0 iSCSI {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs...
Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest 1.0.0.0 Kds {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsC...
Manifest 1.0.1.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}
Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...
Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}
Manifest 1.0.0.0 Microsoft.PowerShell.LocalAccounts {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser...
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...
Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy
Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredS...
Manifest 1.0 MMAgent {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...
Manifest 1.0.0.0 MsDtc {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans...
Manifest 2.0.0.0 NetAdapter {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne...
Manifest 1.0.0.0 NetConnection {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest 1.0.0.0 NetDiagnostics Get-NetView
Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession, Get-NetEvent...
Manifest 2.0.0.0 NetLbfo {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea...
Manifest 1.0.0.0 NetNat {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa...
Manifest 2.0.0.0 NetQos {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ...
Manifest 2.0.0.0 NetSecurity {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse...
Manifest 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea...
Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol...
Manifest 1.0.0.0 NetWNV {Get-NetVirtualizationProviderAddress, Get-NetVirtualizati...
Manifest 1.0.0.0 NetworkConnectivityStatus {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese...
Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt...
Manifest 1.0.0.0 NetworkTransition {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig...
Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar...
Binary 1.0.0.0 PersistentMemory {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegio...
Manifest 1.0.0.0 PKI {Add-CertificateEnrollmentPolicyServer, Export-Certificate...
Manifest 1.0.0.0 PnpDevice {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, D...
Manifest 1.1 PrintManagement {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin...
Binary 1.0.11 ProcessMitigations {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-P...
Script 3.0 Provisioning {Install-ProvisioningPackage, Export-ProvisioningPackage, ...
Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration,...
Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS...
Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo...
Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow
Manifest 1.0.0.0 ScheduledTasks {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT...
Manifest 2.0.0.0 SecureBoot {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo...
Manifest 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha...
Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...
Manifest 1.0.0.0 StartLayout {Export-StartLayout, Import-StartLayout, Export-StartLayou...
Manifest 2.0.0.0 Storage {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add...
Manifest 2.0.0.0 TLS {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa...
Manifest 1.0.0.0 TroubleshootingPack {Get-TroubleshootingPack, Invoke-TroubleshootingPack}
Manifest 2.0.0.0 TrustedPlatformModule {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...}
Binary 2.1.639.0 UEV {Clear-UevConfiguration, Clear-UevAppxPackage, Restore-Uev...
Manifest 2.0.0.0 VpnClient {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio...
Manifest 1.0.0.0 Wdac {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...}
Manifest 1.0.0.0 WindowsDeveloperLicense {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperL...
Script 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti...
Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting}
Manifest 1.0.0.0 WindowsUpdate Get-WindowsUpdateLog
Manifest 1.0.0.2 WindowsUpdateProvider {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastSca...
Debug output
No additional details available
VERBOSE: Get-AzDataFactoryV2Dataset : Can not convert Object to String.
VERBOSE: At E:\Azure_DevOps_Agent\_work\r5\a\_REPONAME\deploymentscript\prepostadfdeployment.ps1:197
char:20
VERBOSE: + ... tasetsADF = Get-AzDataFactoryV2Dataset -DataFactoryName $DataFactoryN ...
VERBOSE: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VERBOSE: + CategoryInfo : CloseError: (:) [Get-AzDataFactoryV2Dataset], ArgumentException
VERBOSE: + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryDatasetCommand
VERBOSE:
VERBOSE: Script stack trace:
VERBOSE: at <ScriptBlock>,
E:\Azure_DevOps_Agent\_work\r5\a\_REPONAME\deploymentscript\prepostadfdeployment.ps1:
VERBOSE: line 197
VERBOSE: at <ScriptBlock>, <No file>: line 1
VERBOSE: at <ScriptBlock>,
VERBOSE:
E:\Azure_DevOps_Agent\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\4.185.0\azurepowershell.ps1:
VERBOSE: line 232
VERBOSE: at <ScriptBlock>,
VERBOSE:
E:\Azure_DevOps_Agent\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\4.185.0\azurepowershell.ps1:
VERBOSE: line 228
VERBOSE: at <ScriptBlock>, <No file>: line 1
VERBOSE: at <ScriptBlock>, <No file>: line 22
VERBOSE: at <ScriptBlock>, <No file>: line 18
VERBOSE: at <ScriptBlock>, <No file>: line 1
VERBOSE: Exception:
VERBOSE: System.ArgumentException: Can not convert Object to String.
VERBOSE: at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
VERBOSE: at Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter`1.ReadJson(JsonReader reader, Type
objectType,
VERBOSE: Object existingValue, JsonSerializer serializer)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter
converter,
VERBOSE: JsonReader reader, Type objectType, Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type
objectType,
VERBOSE: Boolean checkAdditionalContent)
VERBOSE: at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
VERBOSE: at Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter`1.ReadJson(JsonReader reader, Type
objectType,
VERBOSE: Object existingValue, JsonSerializer serializer)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter
converter,
VERBOSE: JsonReader reader, Type objectType, Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property,
JsonConverter
VERBOSE: propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader,
Object
VERBOSE: target)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader
reader,
VERBOSE: JsonObjectContract contract, JsonProperty member, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type
objectType,
VERBOSE: JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty
containerMember,
VERBOSE: Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader,
VERBOSE: JsonArrayContract contract, JsonProperty containerProperty, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type
objectType,
VERBOSE: JsonContract contract, JsonProperty member, Object existingValue, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property,
JsonConverter
VERBOSE: propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader,
Object
VERBOSE: target)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader
reader,
VERBOSE: JsonObjectContract contract, JsonProperty member, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type
objectType,
VERBOSE: JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty
containerMember,
VERBOSE: Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type
objectType,
VERBOSE: Boolean checkAdditionalContent)
VERBOSE: at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
VERBOSE: at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings
settings)
VERBOSE: at
Microsoft.Azure.Management.DataFactory.DatasetsOperations.<ListByFactoryNextWithHttpMessagesAsync>d__9.MoveNext()
VERBOSE: --- End of stack trace from previous location where exception was thrown ---
VERBOSE: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
VERBOSE: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
VERBOSE: at
Microsoft.Azure.Management.DataFactory.DatasetsOperationsExtensions.<ListByFactoryNextAsync>d__9.MoveNext()
VERBOSE: --- End of stack trace from previous location where exception was thrown ---
VERBOSE: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
VERBOSE: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
VERBOSE: at
Microsoft.Azure.Management.DataFactory.DatasetsOperationsExtensions.ListByFactoryNext(IDatasetsOperations
VERBOSE: operations, String nextPageLink)
VERBOSE: at Microsoft.Azure.Commands.DataFactoryV2.DataFactoryClient.ListDatasets(AdfEntityFilterOptions
filterOptions)
VERBOSE: at Microsoft.Azure.Commands.DataFactoryV2.DataFactoryClient.FilterPSDatasets(AdfEntityFilterOptions
filterOptions)
VERBOSE: at Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryDatasetCommand.ExecuteCmdlet()
VERBOSE: at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Error output
Get-AzDataFactoryV2Dataset : Can not convert Object to String.
At line:1 char:1
+ Get-AzDataFactoryV2Dataset -ResourceGroupName "$ResourceGroupName" -D ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzDataFactoryV2Dataset], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryDatasetCommand
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @shawnxzq, @lmy269.
Issue Details
Description
Get-AzDataFactoryV2Dataset fails to retrieve the information of a specific DATASET, and fails with error "Get-AzDataFactoryV2Dataset : Can not convert Object to String."
Steps to reproduce
- Open Azure Datafactory
- Create a dataset - Binary over Azure ADLS Storage
- In the "Compression Type": use "add dynamic content" and try to pick a parameter as input (attached a sample json)
- Save and Publish the Data Set
- Now try to run the Get-AzDataFactoryV2Dataset -ResourceGroupName "$ResourceGroupName" -DataFactoryName "$FactoryName"
- You will see the error
Get-AzDataFactoryV2Dataset -ResourceGroupName "$ResourceGroupName" -DataFactoryName "$FactoryName"
Environment data
Name Value
---- -----
PSVersion 5.1.17134.858
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.858
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
Debug output
No additional details available
VERBOSE: Get-AzDataFactoryV2Dataset : Can not convert Object to String.
VERBOSE: At E:\Azure_DevOps_Agent\_work\r5\a\_REPONAME\deploymentscript\prepostadfdeployment.ps1:197
char:20
VERBOSE: + ... tasetsADF = Get-AzDataFactoryV2Dataset -DataFactoryName $DataFactoryN ...
VERBOSE: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VERBOSE: + CategoryInfo : CloseError: (:) [Get-AzDataFactoryV2Dataset], ArgumentException
VERBOSE: + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryDatasetCommand
VERBOSE:
VERBOSE: Script stack trace:
VERBOSE: at <ScriptBlock>,
E:\Azure_DevOps_Agent\_work\r5\a\_REPONAME\deploymentscript\prepostadfdeployment.ps1:
VERBOSE: line 197
VERBOSE: at <ScriptBlock>, <No file>: line 1
VERBOSE: at <ScriptBlock>,
VERBOSE:
E:\Azure_DevOps_Agent\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\4.185.0\azurepowershell.ps1:
VERBOSE: line 232
VERBOSE: at <ScriptBlock>,
VERBOSE:
E:\Azure_DevOps_Agent\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\4.185.0\azurepowershell.ps1:
VERBOSE: line 228
VERBOSE: at <ScriptBlock>, <No file>: line 1
VERBOSE: at <ScriptBlock>, <No file>: line 22
VERBOSE: at <ScriptBlock>, <No file>: line 18
VERBOSE: at <ScriptBlock>, <No file>: line 1
VERBOSE: Exception:
VERBOSE: System.ArgumentException: Can not convert Object to String.
VERBOSE: at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
VERBOSE: at Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter`1.ReadJson(JsonReader reader, Type
objectType,
VERBOSE: Object existingValue, JsonSerializer serializer)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter
converter,
VERBOSE: JsonReader reader, Type objectType, Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type
objectType,
VERBOSE: Boolean checkAdditionalContent)
VERBOSE: at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
VERBOSE: at Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter`1.ReadJson(JsonReader reader, Type
objectType,
VERBOSE: Object existingValue, JsonSerializer serializer)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter
converter,
VERBOSE: JsonReader reader, Type objectType, Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property,
JsonConverter
VERBOSE: propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader,
Object
VERBOSE: target)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader
reader,
VERBOSE: JsonObjectContract contract, JsonProperty member, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type
objectType,
VERBOSE: JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty
containerMember,
VERBOSE: Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader,
VERBOSE: JsonArrayContract contract, JsonProperty containerProperty, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type
objectType,
VERBOSE: JsonContract contract, JsonProperty member, Object existingValue, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property,
JsonConverter
VERBOSE: propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader,
Object
VERBOSE: target)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader
reader,
VERBOSE: JsonObjectContract contract, JsonProperty member, String id)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type
objectType,
VERBOSE: JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty
containerMember,
VERBOSE: Object existingValue)
VERBOSE: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type
objectType,
VERBOSE: Boolean checkAdditionalContent)
VERBOSE: at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
VERBOSE: at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings
settings)
VERBOSE: at
Microsoft.Azure.Management.DataFactory.DatasetsOperations.<ListByFactoryNextWithHttpMessagesAsync>d__9.MoveNext()
VERBOSE: --- End of stack trace from previous location where exception was thrown ---
VERBOSE: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
VERBOSE: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
VERBOSE: at
Microsoft.Azure.Management.DataFactory.DatasetsOperationsExtensions.<ListByFactoryNextAsync>d__9.MoveNext()
VERBOSE: --- End of stack trace from previous location where exception was thrown ---
VERBOSE: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
VERBOSE: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
VERBOSE: at
Microsoft.Azure.Management.DataFactory.DatasetsOperationsExtensions.ListByFactoryNext(IDatasetsOperations
VERBOSE: operations, String nextPageLink)
VERBOSE: at Microsoft.Azure.Commands.DataFactoryV2.DataFactoryClient.ListDatasets(AdfEntityFilterOptions
filterOptions)
VERBOSE: at Microsoft.Azure.Commands.DataFactoryV2.DataFactoryClient.FilterPSDatasets(AdfEntityFilterOptions
filterOptions)
VERBOSE: at Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryDatasetCommand.ExecuteCmdlet()
VERBOSE: at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Error output
Get-AzDataFactoryV2Dataset : Can not convert Object to String.
At line:1 char:1
+ Get-AzDataFactoryV2Dataset -ResourceGroupName "$ResourceGroupName" -D ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzDataFactoryV2Dataset], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryDatasetCommand
BINARY_DATASET_WITHDYNAMIC_COMPRESSION.json.txt
| Author: | SudhirNune |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
@SudhirNune Suggest you get the latest version of Az module and try again, https://docs.microsoft.com/en-us/powershell/module/az.datafactory/?view=azps-5.9.0.
If you still see the issue, there should be one Rest dataset caused the issue, please try to use the PS cmd to get each individual Rest dataset in your factory and see which once caused the issue, then please share the json code of that rest dataset from UX to help troubleshooting, thx!
@shawnxzq
In my original post I had the dataset json attached.

I tried with latest PS, and I see the same issue.
@SudhirNune This is because your dataset parameterized the compression type, which is not supported in our swagger for now, please don't parameterize it, we will look into whether we can support it, thx!
@shawnxzq - thanks for the confirmation
@SudhirNune Given the issue is confirmed, we will close this issue for now, please let us know if you have any more questions, thanks!
Known issue, fix is being worked on.
Fix checked in, waiting for release.
Issue fixed.