The Xml Source Component allows you to break out column data from Xml (or associated CSV, HL7, EDI, Positional or Delimited formats) in a data-flow. This Xml can be sourced from a column or variable, and the component can be used a a pure source in a data-flow (i.e. with no predecessor link) or as a transformation. When used in transformation mode, all input column data is copied to the output along with the generated rows and columns from the Xml - each input row can create more than one output row (or indeed no output rows).
The configuration interface as shown below allows you to select the source of the Xml and the error-handling behavior.
Clicking the
Edit Mapping button launches the BlueSSIS Graphical mapping tool.
This tool allows you to drag links from the source (left) side to the destination (right side). You can link to and from content or variables. These can be direct links, or via functoids - units of reusable logic. Functoids provide logic including comparisons, counting, mathematical operations, lookups, accumulations, xpath querying, string functions and date / time arithmetic. They can also provide more sophisticated functionality, including database lookups, script functions, enumeration, duplicate elimination, grouping and execution control. To use a functoid, simply drag it from the functoid area on the right onto the main page (between the source and destination areas), and then connect its' inputs and outputs by drag and drop. You can test your map using the functions in the Tools menu.
The graphical mapping tool is part of our sister application
BlueIntegrator, and
full help can be found here. Essentially though at execution time the nodes in the source document are executed in order, passing through functoids as appropriate to create output values.
You click the
Edit Source Schema link to define the format of the source Xml. This launches the
BlueSSIS Schema editor, within which you can intuitively define Xml schemas and
alternative representations.
You can enter XSD directly, or use the tree view to create a hierarchical structure interactively. You can right-click in the tree control or use the Insert menu to modify the structure. The Properties window allows you to configure advanced properties in relation to the selected item in the tree view.
To define an alternative representation, or more typically to generate an Xml schema from an alternate representation, you can use the Special Schemas form, accessible from the Tools menu and also shown by default the first time the schema editor is launched.
This form guides you through the process of defining a CSV, flat-file (positional or delimited), HL7 or EDI schema. For further details please see the associated help pages for
BlueIntegrator, our sister product on which this functionality is based, on
Special Schemas and
The Schema Editor. You may also be interested in our notes on
setting up a simple HL7 scenario.
You click the
Edit Destination Schema link to configure the output columns.
After selecting the schemas, the elements of the schema are shown in the source and
destination trees and can be linked as required.
All BlueSSIS data-flow components also support properties
Fail on truncation and
Unicode mode, allowing you to define applicable truncation and Unicode settings. These properties can be found in the Visual Studio/BIDS Properties window.