SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Generate XSD using SSIS


Generate XSD using SSIS

Author
Message
yosiasz
yosiasz
Old Hand
Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)

Group: General Forum Members
Points: 317 Visits: 821
Greetings

In BIDS 2005 is it possible to generate an xsd file given an xml file?

Thanks
Alvin Ramard
Alvin Ramard
SSCrazy Eights
SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)

Group: General Forum Members
Points: 8734 Visits: 11683
I belive so. (I don't have access to BIDS right now to check)

Create an XML Connection Manager and point it to your XML file. On the form you should see a button for generating the XSD.



Alvin Ramard
Memphis PASS Chapter

All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help
TeraByteMe
TeraByteMe
Right there with Babe
Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)

Group: General Forum Members
Points: 781 Visits: 589
I there anyway to automate the creation of the XSD file. Such that when the package runs every time it will create the XSD from the XML.

A clever person solves a problem. A wise person avoids it. ~ Einstein
select cast (0x5365616E204465596F756E67 as varchar(128))
Tim Mitchell
Tim Mitchell
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3673 Visits: 3055
To my knowledge, there's no way to generate an XSD on the fly at runtime. At design time, yes - you can do this using the XML source to generate an XSD based on the specified XML file.

A larger question would be: do you really want to do this on the fly? SSIS is very picky about metadata, and if a dynamically generated XSD file materially changes the metadata structure of the data flow, you'll get an error when the package executes.



Tim Mitchell, Microsoft Data Platform MVP
Data Warehouse and ETL Consultant
TimMitchell.net | @Tim_Mitchell | Tyleris.com
ETL Best Practices


yosiasz
yosiasz
Old Hand
Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)

Group: General Forum Members
Points: 317 Visits: 821
It is possible and I have done it since my original post but it is not worth it, too complicated and not worth the effort. It would require some serious automation and involved some .net within the SSIS package.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search