Tuesday, 2 July 2013

BIML: An error occurred while parsing EntityName

Case
I'm creating an SSIS package with BIML and I want to add an expression in my Derived Column with an Logical AND &&.

    
        ISNULL([Column1]) && ISNULL([Column2])
    

But when I check the BIML Script for errors with the 'Check Biml for Errors'-option in the context menu, I got an error: An error occurred while parsing EntityName
An error occurred while parsing EntityName














When I replace it with an Logical Or || it works without errors. What's wrong?

Solution
An XML document doesn't like an ampersand (&). You have to replace it by & or enclose it with CDATA.


    
        ISNULL([Column1]) && ISNULL([Column2])
    



    
        ISNULL([Column1]) <![CDATA[&&]]> ISNULL([Column2])
    



Now you can build the Biml Script without errors.

No comments:

Post a Comment

Please use the SSIS MSDN forum for general SSIS questions that are not about this post. I'm a regular reader of that forum and will gladly answer those questions over there.

All comments are moderated manually to prevent spam.

Related Posts Plugin for WordPress, Blogger...