![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hello, This is a limitation of SSIS. Some other tasks return an Xml DOM document or other format XML stored in variable. Now the result can't be immediately consumed by the Xml task because it takes Xml string only. Users would have to add a script task (or by some other means) to translate the DOM document/Other format to an xml string. This limiation is noticed by product team and they have started to evaluate this issue to see if there shall be design change on this feature. I also encourage you submit your feedback on this feature via the link below so that product team could hear more sounds on this from users. http://lab.msdn.microsoft.com/produc...k/default.aspx Thanks & Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. |
#4
| |||
| |||
|
|
Peter, I'm not sure I understand what this has to do with the variable set by Foreach. It was my understanding that Foreach loop assigns the path and filename, not the actual content of the file, in the variable. I wanted this fully qualified path to be used as the XML Task Source. I'm looking at the XML Task documentation and it says the following about the source: "If the source is a variable, the specified variable contains the path of the XML document. " If what you are saying is true, this is documented wrong. ""privatenews"" wrote: Hello, This is a limitation of SSIS. Some other tasks return an Xml DOM document or other format XML stored in variable. Now the result can't be immediately consumed by the Xml task because it takes Xml string only. Users would have to add a script task (or by some other means) to translate the DOM document/Other format to an xml string. This limiation is noticed by product team and they have started to evaluate this issue to see if there shall be design change on this feature. I also encourage you submit your feedback on this feature via the link below so that product team could hear more sounds on this from users. http://lab.msdn.microsoft.com/produc...k/default.aspx Thanks & Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. |
#5
| |||
| |||
|
|
I'm having a problem using the Foreach Loop container that contains an XML Task followed by a data flow task. When I run my package in the debugger, the XML Task fails with the following errors: [XML Task] Error: An error occurred with the following error message: "Data at the root level is invalid. Line 1, position 1.". [XML Task] Error: Property "New Source" has no source Xml Text; Xml Text is either invalid, null or empty string. The Foreach Loop container is a file enumerator. The XML Task validates XML files using an XSD file. The XML Task SourceType is a variable and the Source has the variable set by the Foreach Loop (index 0). I have an XML file which I know is valid. For some reason, the XML Task Source is not referencing the variable, set by the Foreach loop. If I use a file connection to the existing XML file, instead of using the variable, the XML Task validates the file successfully. I believe there might be a bug in the XML Task when a variable is specified. If I disable the task and let my data flow task run, it has no problem importing each XML file, in the directory, using an XML Source that uses the Foreach loop variable for the Source. My data flow completes correctly. Am I doing something wrong here or does this sound like a bug? Any workarounds? |
#6
| |||
| |||
|
|
Hello again! I was actually able to find a workaround for this! Create a new file connection (by right clicking connection managers and choose new File Connection), set the source of this one to an arbitrary file first. Then, on the "Expressions" property, choose "ConnectionString" and set this to the variable you want to use. Set the source of your XML Task to the file connection you created. And voila, it should work! - maggie Hasan Quadri skrev: I'm having a problem using the Foreach Loop container that contains an XML Task followed by a data flow task. When I run my package in the debugger, the XML Task fails with the following errors: [XML Task] Error: An error occurred with the following error message: "Data at the root level is invalid. Line 1, position 1.". [XML Task] Error: Property "New Source" has no source Xml Text; Xml Text is either invalid, null or empty string. The Foreach Loop container is a file enumerator. The XML Task validates XML files using an XSD file. The XML Task SourceType is a variable and the Source has the variable set by the Foreach Loop (index 0). I have an XML file which I know is valid. For some reason, the XML Task Source is not referencing the variable, set by the Foreach loop. If I use a file connection to the existing XML file, instead of using the variable, the XML Task validates the file successfully. I believe there might be a bug in the XML Task when a variable is specified. If I disable the task and let my data flow task run, it has no problem importing each XML file, in the directory, using an XML Source that uses the Foreach loop variable for the Source. My data flow completes correctly. Am I doing something wrong here or does this sound like a bug? Any workarounds? |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Hello, I want to thanks Maggie for sharing this workaround! I tested on my side and it works fine. The document on XML Task is not correct and I'v reported this bug to the proper channel. As I mentioned, there shall be design change on this feature to meet customer's requirements better. Best Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. |
#9
| |||
| |||
|
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |