|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 10:46 AM
Points: 156,
Visits: 512
|
|
Goal : Need to pull data from XML file (800MB).
Note: I tried to do with XML task and XSLT but couldn't make it work, it gives me an Out of Memory expection error.
http://beyondrelational.com/modules/2/blogs/106/posts/11130/ssis-read-xml-file-in-script-component-as-source.aspx
I end up searching above link.
Issues : I can't get this to work either. My script task complaints me when I try to AddRow() function, (Please go throw the link if you can understand C# ) Script complaints "doesnot contain definition and no extension method can be found (are you missing a using directive or an assembly reference?)"
Help need: Plz suggest me a solution to read data frm XML either through new process or Please guide me to help out of this error thrown while writing C# script (in the link above).
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 9:39 AM
Points: 4,247,
Visits: 9,500
|
|
quillis131 (2/14/2013) Goal : Need to pull data from XML file (800MB).
Note: I tried to do with XML task and XSLT but couldn't make it work, it gives me an Out of Memory expection error.
http://beyondrelational.com/modules/2/blogs/106/posts/11130/ssis-read-xml-file-in-script-component-as-source.aspx
I end up searching above link.
Issues : I can't get this to work either. My script task complaints me when I try to AddRow() function, (Please go throw the link if you can understand C# ) Script complaints "doesnot contain definition and no extension method can be found (are you missing a using directive or an assembly reference?)"
Help need: Plz suggest me a solution to read data frm XML either through new process or Please guide me to help out of this error thrown while writing C# script (in the link above).
I can understand C# and read the link, which presumably is a working solution.
I would guess that either: a) The Script Component config has been set up wrongly, or b) Your C# code has one or more syntax errors
but guesswork is as far as I can go without more info.
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 8:27 PM
Points: 6,735,
Visits: 11,788
|
|
800MB is an awfully large XML document. Note that when represented in memory as an XMLDocument object it will occupy far more space that just the file on disk. How much RAM is on the machine you are trying this on?
Try with a smaller version of the file with the same structure and see if you can get a proof-of-concept done.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 10:46 AM
Points: 156,
Visits: 512
|
|
opc.three (2/15/2013) 800MB is an awfully large XML document. Note that when represented in memory as an XMLDocument object it will occupy far more space that just the file on disk. How much RAM is on the machine you are trying this on?
Try with a smaller version of the file with the same structure and see if you can get a proof-of-concept done. I was able to load 200MB of file size through XSLT script in XML task. But Working with 800MB File size is an issue here.
Is there any better solution you can think of to load 800MB of XML file?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 8:27 PM
Points: 6,735,
Visits: 11,788
|
|
I think XMLReader is going to scale better because it dies not have to load the entire file into memory to work with it, but in using it you're signing up for some C# coding.
You could also look into SQLXML bulk load. I have used it successfully in the past but not for anything close to the size file you're dealing with, maybe 50MB tops iirc.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 10:46 AM
Points: 156,
Visits: 512
|
|
opc.three (2/15/2013) I think XMLReader is going to scale better because it dies not have to load the entire file into memory to work with it, but in using it you're signing up for some C# coding.
You could also look into SQLXML bulk load. I have used it successfully in the past but not for anything close to the size file you're dealing with, maybe 50MB tops iirc.
Can you spell out C# code with XML reader? I could make use of it plz
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 8:27 PM
Points: 6,735,
Visits: 11,788
|
|
Use of XMLReader is an iterative approach so you'll be writing code with the structure "for each node in document, do something" and those for each statements can be nested. The actual code will depend on your XML structure. You'll find numerous samples of this online.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|