Reputation: 1
I'm currently in the middle of creating a few powershell scripts that need to invoke a Synapse pipeline using Invoke-AzSynapsePipeline, many of which have parameters that need passed in using a hashtable. Removing the parameter, it works flawlessly, but whenever I try to pass in a hashtable to the -Parameter input, it results in, "Not supported type System.Management.Automation.PSObject". I'm running powershell 7.1 and have tried multiple variations of the code to no avail. Here's a sample for reference. Any idea?
$auditParams = @{
"serviceType"="Azure Synapse Workspace";
"resourceName"="my Workspace Name"
}
Invoke-AzSynapsePipeline -WorkspaceName $wsName -PipelineName $plName -Parameter $auditParams
Upvotes: 0
Views: 567
Reputation: 11
I had the same problem but looks like this thread did not get resolved. Hitting up Dr. Google some more, this is what ended up working for me to pass two script parameters to the pipeline (not a comma but CRLF after the first parameter):
$hash_table= @{
"DatabaseName" = $orig_db
"TableName" = $orig_tb
}
Invoke-AzSynapsePipeline -WorkspaceName $xxx -PipelineName "yyy" -Parameter $hash_table
The corresponding pipeline has to have the matching parameters setup, see screenshot "pipeline snippet"
Upvotes: 1
Reputation: 1
Have you tried putting all parameters into a file? E.g.
params.json
{
"serviceType":"Azure Synapse Workspace",
"resourceName":"my Workspace Name"
}
and then calling like this:
Invoke-AzSynapsePipeline -WorkspaceName $wsName -PipelineName $plName -ParameterFile <path\to\params.json>
Upvotes: 0