March 13, 2012 at 6:38 am
1.I need to read data from Flat file, convert into XML string and load into XML column in a SQL table.
My Data Flow:
Flat file -->temp table--> For XML query--> XML string stored in SSIS string variable--> insert variable into XML column
Is there anyway to convert flat file data to XMLstring without using temp table?
2. For having XML Destintaion in SSIS, Is there any adapters available?
March 13, 2012 at 8:15 am
There aren't any XML destination adapters available out-of-the-box.
It's possible that there are 3rd party adapters available on the web for purchase.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 14, 2012 at 5:19 am
Thanks Koen...
Do you have any inputs on the below:
1.I need to read data from Flat file, convert into XML string and load into XML column in a SQL table.
My Data Flow:
Flat file -->temp table--> For XML query--> XML string stored in SSIS string variable--> insert variable into XML column
Is there anyway to convert flat file data to XMLstring without using temp table?
March 14, 2012 at 5:51 am
Unless you code the XML yourself in a script component, I don't think so.
But I would skip the step where you read the temp table out with FOR XML, put it into a variable and then insert it into the table.
I would insert it directly in the table using an INSERT clause followed by a SELECT ... FOR XML.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 15, 2012 at 1:53 am
you suggest me to read individual fields from file, put in variables using Script and then use INSERT clause in Execute SQL task
Am i correct?
March 15, 2012 at 1:58 am
No, I would read the file and write it entirely to a staging table.
Then I would read this staging table with a FOR XML clause and insert the results in the final destination table.
No variables involved.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 15, 2012 at 6:54 am
Koen,
Is it not possible without storing flat file data in Staging table?
Thanks.
March 15, 2012 at 7:01 am
Gerbera (3/15/2012)
Koen,Is it not possible without storing flat file data in Staging table?
Thanks.
Yes, if you construct the XML yourself in a script task.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 15, 2012 at 7:28 am
The Fields from which I need to construct the XML is coming from flat file..
So i need to use them in SCRIPT COMPONENT as destination inside a dataflow and construct an XML?
March 15, 2012 at 7:34 am
Yup.
I guess there are plenty of sources on the net on how to create XML in .NET.
p.s.: my guess is that you'll be begging for the temp table 🙂
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 15, 2012 at 7:37 am
🙁 let me look into the available options;
March 19, 2012 at 4:48 am
Yes 🙂 As you say, i have requested for temp table !
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply