Partager via


Lesson 3: Vulcan XML File structure

As you’ve seen in HelloWorld.xml of Lesson 1, the Vulcan XML file has a clear structure which enables the file itself easy to read and modify. You may have understood the basic grammar by just looking at HelloWorld.xml. Here’s the detailed explanation:

<Vulcan xmlns="https://tempuri.org/vulcan2.xsd">

</Vulcan>

All the table definitions, ETLs should only exist in <Vulcan> element.

 

<Connections>

</Connections>

The list of all the connections used in the tables, ETLs. Each connection is represented by <Connection> element as below.   

<Connection Name="TestDataWarehouse" Type="OLEDB" ConnectionString="Data Source=localhost\sql2008;Initial Catalog=TestDataWarehouse;Provider=SQLNCLI10.1;Integrated Security=SSPI;" />

The connection defined by Name, Type and ConnectionString. The Name attribute will be used in table definitions and ETLs.

 

<Table Name="HelloWorld" ConnectionName="TestDataWarehouse">

</Table>

This is a table definition framework. You need to give it a name to be referenced in other places. The ConnectionName attribute specifies the connection to be used by this table.

 

<Columns>

</Columns>

This is the list of columns in a table. Each column is defined by <Column> element as below.

 

<Column Name="HelloID" Type="INT64" />

Column is usually defined by Name, Type and other attributes depending on the column’s type. Such as Length, Precision, Scale, IsNullable, Computed.

 

<Keys>

</Keys>

This is the list of keys defined in a table. Each key is defined by a key element as below. You can choose from Identity, PrimaryKey, and UniqueKey.

 

<PrimaryKey Name="PK_HelloPrimary" Clustered="true">

      <Column ColumnName="HelloID" />

</PrimaryKey>

These 3 lines define a primary key by its Name, Clustered attributes and its underlying column. There are other attributes you can apply to a key and the underlying column. For example, SortOrder can be used to specify if the sorting order is ascending or descending.

 

<Sources>

      <StaticSource>

            <Row>0, 'Hello, World!'</Row>

            <Row>1000, 'Hello, World 1000 times!'</Row>

      </StaticSource>

</Sources>

The above lines just put initial values into the table and should be straightforward.