Monday, January 4, 2016

How to use Validate in XML Task SSIS 2014

The XML Task is used when you need to validate, modify, extract, or even create files in an XML format.
In SSIS 2014, there are six operation types are available.

Validate: This option allows for the schema validation of an XML file against Document Type Definition (DTD) or XML Schema Definition (XSD) binding control documents. You can use this option to ensure that a provided XML file adheres to your expected document format.

The following example show that how to use validate operation type.
In the real scenario, before processing XML data, we should validate for example if XML schema validation failed then it should notify and stop processing the data.
You can create a XSD file using XML file
Create a XML file without one of the filed, for example remove publish_date filed from source file
Set the configurations and run the job and see the job will failed and email notification will be set.
Cheers!
Uma

1 comment: