CallBimlScript with parameters give error "Template host did not supply the required property"

When trying to use parameterized biml file using CallBimlScript like this

<#=CallBimlScript("VariableTest.biml", "variableValue") #>

And VariableTest.Biml looks like this

<#@ property name="variableValue" type="String" required="true" #>
<#= variableValue #>

Biml generation will fail with the following error

Expanding BIML
Error 0 Template host did not supply the required property: variableValue. C:\path\VariableTest.biml 0 0
Parse. There were errors during compilation. See compiler output for more information.

The error is because of bugs inside biml engine.
To work around this problem, Set required="false" like so

<#@ property name="variableValue" type="String" required="false" #>
<#= variableValue #>

The parameter passing will now work. If you need parameter validation, you have to implement it yourself.

Comments

Popular posts from this blog

Constructing nested array structs in BigQuery

How to decrypt stored password from SSMS registered servers

Cause for Parameter is incorrect 0x80070057 error in ssis