December 28, 2011 at 2:27 pm
Hi,
I am new to SSIS Package Creation, I have and XML Source which in need to load in SQL Server Table's . In XML File in Header Section i have DocumentIDentifier and DocumentDatetime and in SQL Server Table i have created tables with this Columns. I want these columns to be added in SQL Tables that i have created . Can any body help me.....
Here is the XML File which i am using....
<?xml version="1.0" encoding="utf-8"?>
<Data>
<AGIISEntityFullExtract xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<ThisDocumentIdentifier>
<DocumentIdentifier>20090701T0415020001</DocumentIdentifier>
</ThisDocumentIdentifier>
<ThisDocumentDateTime>
<DateTime DateTimeQualifier="On">20090701T041502</DateTime>
</ThisDocumentDateTime>
<From>
<PartnerInformation>
<PartnerName>Covansys</PartnerName>
<PartnerIdentifier Agency="EBID">1324108090000</PartnerIdentifier>
<ContactInformation>
<ContactName>Lorie Gasso</ContactName>
<TelephoneNumber>
<NationalTelephoneNumber>(866)251-8618</NationalTelephoneNumber>
</TelephoneNumber>
<EmailAddress>cbrown210@csc.com</EmailAddress>
</ContactInformation>
</PartnerInformation>
</From>
<To>
<PartnerInformation>
<PartnerName>GS1 US INC</PartnerName>
<PartnerIdentifier Agency="EBID">1132282040000</PartnerIdentifier>
<ContactInformation>
<ContactName>Sean Lockhead</ContactName>
<TelephoneNumber>
<NationalTelephoneNumber>(609) 620-4645</NationalTelephoneNumber>
</TelephoneNumber>
<EmailAddress>cbrown210@csc.com</EmailAddress>
</ContactInformation>
</PartnerInformation>
</To>
</Header>
<Body>
<AGIISEntityFullExtractDetails>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100011442291</IndustryCode>
</IndustryIdentifier>
<PreferredName>JAMES OWEN QUINLEY</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>2894 SHELBY 308</AddressLine1>
<CityName>CLARENCE</CityName>
<StateOrProvince>MO</StateOrProvince>
<PostalCode>634373222</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>29205</FIPSCode>
<CountyName>SHELBY</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043235052</IndustryCode>
</IndustryIdentifier>
<PreferredName>COLUMBUS FLOORCOVERING SUPPLIES</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>6351 CATALINA DR</AddressLine1>
<CityName>COLUMBUS</CityName>
<StateOrProvince>GA</StateOrProvince>
<PostalCode>319093628</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>13215</FIPSCode>
<CountyName>MUSCOGEE</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100042536389</IndustryCode>
</IndustryIdentifier>
<PreferredName>FEED STORE LLC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>1029 MONTGOMERY HWY</AddressLine1>
<CityName>DOTHAN</CityName>
<StateOrProvince>AL</StateOrProvince>
<PostalCode>363036057</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>01069</FIPSCode>
<CountyName>HOUSTON</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043548602</IndustryCode>
</IndustryIdentifier>
<PreferredName>CENTRAL GEORGIA CO-OP INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>43 HOUSTON ST</AddressLine1>
<CityName>HAWKINSVILLE</CityName>
<StateOrProvince>GA</StateOrProvince>
<PostalCode>310364917</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>13235</FIPSCode>
<CountyName>PULASKI</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043549456</IndustryCode>
</IndustryIdentifier>
<PreferredName>MORGAN CO COMMISSION</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>302 LEE ST NE</AddressLine1>
<CityName>DECATUR</CityName>
<StateOrProvince>AL</StateOrProvince>
<PostalCode>356011926</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>01103</FIPSCode>
<CountyName>MORGAN</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069004249</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>418 E NORTH ST</AddressLine1>
<CityName>DWIGHT</CityName>
<StateOrProvince>IL</StateOrProvince>
<PostalCode>604201016</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>17105</FIPSCode>
<CountyName>LIVINGSTON</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043549777</IndustryCode>
</IndustryIdentifier>
<PreferredName>KERRVILLE RANCH & PET CENTER</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>516 QUINLAN ST</AddressLine1>
<CityName>KERRVILLE</CityName>
<StateOrProvince>TX</StateOrProvince>
<PostalCode>780284455</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>48265</FIPSCode>
<CountyName>KERR</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Inactive">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043550667</IndustryCode>
</IndustryIdentifier>
<PreferredName>BUNTINGS DUSTING INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>9758 CAREY RD</AddressLine1>
<CityName>BERLIN</CityName>
<StateOrProvince>MD</StateOrProvince>
<PostalCode>218112116</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>24047</FIPSCode>
<CountyName>WORCESTER</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043551053</IndustryCode>
</IndustryIdentifier>
<PreferredName>STEPHENSON MKTG COOPERATIVE INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>1109 COUNTY ROAD B</AddressLine1>
<CityName>NIAGARA</CityName>
<StateOrProvince>WI</StateOrProvince>
<PostalCode>541519198</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>55037</FIPSCode>
<CountyName>FLORENCE</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100039856452</IndustryCode>
</IndustryIdentifier>
<PreferredName>INTERMOUNTAIN FARMERS ASSOCIATION INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>212 S 800 W</AddressLine1>
<CityName>SALINA</CityName>
<StateOrProvince>UT</StateOrProvince>
<PostalCode>846541077</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>49041</FIPSCode>
<CountyName>SEVIER</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043552043</IndustryCode>
</IndustryIdentifier>
<PreferredName>MAUNEY FEED MILL INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>40225 US HIGHWAY 52 N</AddressLine1>
<CityName>NEW LONDON</CityName>
<StateOrProvince>NC</StateOrProvince>
<PostalCode>281278552</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>37167</FIPSCode>
<CountyName>STANLY</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100037503624</IndustryCode>
</IndustryIdentifier>
<PreferredName>FARMERS UNION COOP GIN INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>DELHI COMMUNITY</AddressLine1>
<CityName>SAYRE</CityName>
<StateOrProvince>OK</StateOrProvince>
<PostalCode>73662</PostalCode>
<FIPSCode>40009</FIPSCode>
<CountyName>BECKHAM</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043552869</IndustryCode>
</IndustryIdentifier>
<PreferredName>PIONEER HI-BRED INTERNATIONAL</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>400 LOCUST ST STE 700</AddressLine1>
<CityName>DES MOINES</CityName>
<StateOrProvince>IA</StateOrProvince>
<PostalCode>503092349</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>19153</FIPSCode>
<CountyName>POLK</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069005512</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>14150 W CORPORATION DR</AddressLine1>
<CityName>DEPUTY</CityName>
<StateOrProvince>IN</StateOrProvince>
<PostalCode>47230</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>18077</FIPSCode>
<CountyName>JEFFERSON</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069005475</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>7440 W STATE ROAD 44</AddressLine1>
<CityName>HOMER</CityName>
<StateOrProvince>IN</StateOrProvince>
<PostalCode>461469806</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>18139</FIPSCode>
<CountyName>RUSH</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069004508</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>12100 WINE HILL RD</AddressLine1>
<CityName>STEELEVILLE</CityName>
<StateOrProvince>IL</StateOrProvince>
<PostalCode>622883006</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>17157</FIPSCode>
<CountyName>RANDOLPH</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043557024</IndustryCode>
</IndustryIdentifier>
<PreferredName>DELTA GROWERS ASSN</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>275 W COUNTY HIGHWAY 450</AddressLine1>
<CityName>SIKESTON</CityName>
<StateOrProvince>MO</StateOrProvince>
<PostalCode>638018474</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>29201</FIPSCode>
<CountyName>SCOTT</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Inactive">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100011006271</IndustryCode>
</IndustryIdentifier>
<PreferredName>BROADWELL FARM CENTER INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>204 N JACOBS ST</AddressLine1>
<CityName>BROADWELL</CityName>
<StateOrProvince>IL</StateOrProvince>
<PostalCode>626346315</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>17107</FIPSCode>
<CountyName>LOGAN</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043557833</IndustryCode>
</IndustryIdentifier>
<PreferredName>HAYWOOD TURF MANAGMENT</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>4886 STARBOARD CT</AddressLine1>
<CityName>DOUGLASVILLE</CityName>
<StateOrProvince>GA</StateOrProvince>
<PostalCode>301351852</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>13097</FIPSCode>
<CountyName>DOUGLAS</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043558250</IndustryCode>
</IndustryIdentifier>
<PreferredName>ARIZONA AG SERVICE INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>25007 S MCQUEEN RD</AddressLine1>
<CityName>CHANDLER</CityName>
<StateOrProvince>AZ</StateOrProvince>
<PostalCode>852493616</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>04013</FIPSCode>
<CountyName>MARICOPA</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069004614</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>203 S BENNET ST</AddressLine1>
<CityName>HARVEL</CityName>
<StateOrProvince>IL</StateOrProvince>
<PostalCode>62538</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>17135</FIPSCode>
<CountyName>MONTGOMERY</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100015505459</IndustryCode>
</IndustryIdentifier>
<PreferredName>SOUTH DAKOTA WHEAT GROWERS ASSOCIATION</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>200 ELEVATOR AVE</AddressLine1>
<CityName>BERLIN</CityName>
<StateOrProvince>ND</StateOrProvince>
<PostalCode>58415</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>38045</FIPSCode>
<CountyName>LAMOURE</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069004423</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>25245 HWY 52 S</AddressLine1>
<CityName>GARNAVILLO</CityName>
<StateOrProvince>IA</StateOrProvince>
<PostalCode>52049</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>19043</FIPSCode>
<CountyName>CLAYTON</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069004454</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>110 1ST ST N</AddressLine1>
<CityName>WORTHINGTON</CityName>
<StateOrProvince>IA</StateOrProvince>
<PostalCode>520789100</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>19061</FIPSCode>
<CountyName>DUBUQUE</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>1100043560765</IndustryCode>
</IndustryIdentifier>
<PreferredName>MID STATE FARMERS COOP</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>HWY 96</AddressLine1>
<CityName>RUSH CENTER</CityName>
<StateOrProvince>KS</StateOrProvince>
<PostalCode>67575</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>20165</FIPSCode>
<CountyName>RUSH</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069005574</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>112 UNION ST</AddressLine1>
<CityName>WEST COLLEGE CORNER</CityName>
<StateOrProvince>IN</StateOrProvince>
<PostalCode>47003</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>18161</FIPSCode>
<CountyName>UNION</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069004225</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>601 N COURT ST</AddressLine1>
<CityName>PONTIAC</CityName>
<StateOrProvince>IL</StateOrProvince>
<PostalCode>617641709</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>17105</FIPSCode>
<CountyName>LIVINGSTON</CountyName>
</PhysicalAddress>
</EntityInformation>
<EntityInformation ActiveFlag="Active">
<IndustryIdentifier Agency="GLN">
<IndustryCode>0741069004430</IndustryCode>
</IndustryIdentifier>
<PreferredName>CROP PRODUCTION SERVICES INC</PreferredName>
<PhysicalAddress Overridden="False">
<AddressLine1>302 E JONES ST</AddressLine1>
<CityName>WYOMING</CityName>
<StateOrProvince>IA</StateOrProvince>
<PostalCode>523627736</PostalCode>
<PostalCountry>US</PostalCountry>
<FIPSCode>19105</FIPSCode>
<CountyName>JONES</CountyName>
</PhysicalAddress>
</EntityInformation>
</AGIISEntityFullExtractDetails>
</Body></AGIISEntityFullExtract></Data>
Here are the table which i created.
Table (1)
Agencynvarchar(255)
IndustryCodenumeric(20, 0)
EntityInformation_Idnumeric(20, 0)
Batch_IDnvarchar(255)
Batch_Datenvarchar(50)
Table 2
FirstNamenvarchar(255)
MiddleNamenvarchar(255)
LastNamenvarchar(255)
Suffixnvarchar(255)
EntityInformation_Idnumeric(20, 0)
Batch_Idnvarchar(255)
Batch_Datenvarchar(50)
December 28, 2011 at 2:58 pm
[
December 28, 2011 at 3:02 pm
I strongly recommend you immediately remove the obviously real data, unless you have proper authorization from each and every company you've listed!!
Replace the data with obfuscated values.
Edit: to post it twice only makes it worse...
December 28, 2011 at 3:13 pm
http://blog.hoegaerden.be/2011/04/07/loading-xml-using-ssis/
I recomend this to you and follow step by step as explained and it is that easy.
Looks like there is an error processing the xml at this line
<PreferredName>KERRVILLE RANCH & PET CENTER</PreferredName>
While I playing I removed the "&" sign in the above line and worked on it.
Work on how to load your data from XML and after that research if this "&" is a data issue.
Hope this helps you out!!
I guess you will make it out easily.
October 12, 2012 at 2:18 am
I followed the example in the blog http://blog.hoegaerden.be/2011/04/07/loading-xml-using-ssis/
but no matter what I try the output only lists the values in the first column and will not display any of the second column values.
here is the xml :
<colors>
<color RGB="FF0000">Red</color>
<color RGB="00FF00">Green</color>
<color RGB="0000FF">Blue</color>
<color RGB="FFFFFF">White</color>
<color RGB="000000">Black</color>
</colors>
this is the xsd generated
<?xml version="1.0"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="colors">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="color">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="RGB" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The output I get is
RGB,text
FF0000,
00FF00,
0000FF,
FFFFFF,
000000,
it does not read the valures of the second column.
What am I missing here? it should work shouldn't it?
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy