Generate XSD using SSIS

  • Greetings

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

    Thanks

  • 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[/url]

    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[/url]

  • 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))

  • 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

  • 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.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply