Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Huge xml extraction from xml column for ETL proces

Author  Topic 

mfayyaz
Starting Member

2 Posts

Posted - 2011-08-10 : 13:53:28
Hi,

My company has a custom solution called Dragon, and they have loads of data that they want to transfer to a relational model. The problem is all the data is in xml, they are creating a table that will has a column of data type of Ntext, I migrated the table to SQl server and converted the datatype to XML.

These are large xml files that I will have process one by one from the table I created, first for initial load, then incremental.

They created in house schemas for these xml that have all the objects, but they are so huge that using XML source is out of the question. I want to use SQLXMBulk load, but its giving me problems.

FOr now I exported the xml to a file and using the bulkload on it.
Here is the vbscript I am trying for just one file first:

set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.4.0")

objBL.ConnectionString = "provider=SQLOLEDB;data source=PUINYDW1;database=PureMapping;integrated security=SSPI"
objBL.ErrorLogFile = "c:\SSIS\MFayyaz\error.log"


objBL.Execute "C:\SSIS\MFayyaz\EDW Export\Household\Objectschema.xsd", "C:\SSIS\MFayyaz\EDW Export\Household\Household 4312147819 (Ralph Kimball).xml"
set objBL=Nothing


I will reply to the topic first with the schema and then with the xml.

mfayyaz
Starting Member

2 Posts

Posted - 2011-08-10 : 13:59:28
Just to clarify, the table I created has a column data type XMl that holds the XML.

The bulk load code keeps erroring out,

Multiple base for dervied type on AnyvehicleleaseorfinanacedCalculated is not supported.

Here is the vehicle element, I tried just taking the element out, and it gave me the same error on another element, that looks pretty much like this one.

<xsd:element name="Anyvehicleleaseorfinancedcalculated" nillable="true" minOccurs="0">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="Text_10">
<xsd:attribute name="os_bv_id" type="xsd:long" use="optional" fixed="43161114"/>
<xsd:attribute name="ldt" type="xsd:long" use="optional" fixed="7"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2011-08-15 : 15:20:06
would be nice if you showed us the error?

If you don't have the passion to help people, you have no passion
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-08-16 : 00:09:46
Have you tried SSIS?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -