Open up SSIS Package as an XML or Raw File

I want to open a ".dtsx" file as a raw file or an xml file (doesn't matter which). Is this possible in SSIS? Not from what I can tell, but I wanted to see if someone else has run into this before.

Edit #1:

My ultimate goal is not to view the xml, but to import the xml in all the packages as text data and search the xml that way. I have about 200-300 packages to search.

Upvotes: 2

Views: 5052

Answers (2)

digital.aaron
digital.aaron

Reputation: 5707

I would take copies of all the packages you want to search and put them in their own folder. Create a Foreach File Loop container, point it to your folder, and give it *.dtsx as the file wildcard. Make sure you set a variable to capture the fully qualified path to the file.

Inside the Foreach Loop, use your path variable as the connection string to a Flat File Connection. Configure the Flat File Connection with Ragged Right as the Format and with Tab as the row delimiter. You should get a single row with a single column. In the Advanced tab of the Flat File Connection Manager, set the DataType to Unicode text stream.

You now have the raw text as an NTEXT field. If you import this into an NVARCHAR(MAX) field in a db table, you'll be able to use SQL's xml processing, which I believe is what you're trying to achieve.

Upvotes: 0

userfl89
userfl89

Reputation: 4790

To view the XML of your package right click the package and select View Code from within SSDT. This will open the XML for it.

Upvotes: 7

Related Questions