SSIS "XML Source Adapter" can't make XSD location an expression
I am using the "XML Source Adapter" in an SSIS package.
I notice that although you can specify the XML filename as an expression, the XSD appears to have to be a fixed file path.
This is a problem for me since the path for the XSD is different in my development than it will be in production (in production it's on drive E:, which I don't have).
I'd like to have the file location specified in the config file, but since I can't make it an expression how can I do that?
Also, since they don't have Connection Managers I can't switch DelayValidation on.
Thanks.
Hi John,
Here is my pevious post
I have about 400 xml files with me and all this data has to be loaded in about 30 tables, Basically have 30 different varities of xml files and matching 30 xsd files. We were trying to load all this using "Data Flow Task" and "XML Source". Using
FOR Each Loop passing appropriate XML File and XSD to Data Flow task and load it in one shot. Rather than having 30 different Data Flow tasks. Is there any other way, we can accomplish this task using a loop and dynamically passing the different files.
You have suggested to follow the URL
There's some example code here for package generation here:
http://sqlsrvintegrationsrv.codeplex.com/releases/view/17647
Everywhere I see, they are suggesting to use Flat File or Excel data examples. Do you have any posting that can help me to use XML file as a dynamic input file for XML Source.
If anyone has any code samples how we can use XML files as dynamic source for XML Source task to import data into SQL Sever, that would be really appreciated.
Thanks
Similar Messages
-
SSIS XML Source not importing data
ISSUE:
I'm working from a complex xml schema. The issue I'm having is that the xsd passes SSIS XML Source validation, I'm able to create each table from its connections, but on import it executes and succeeds but w/o importing any data.
FILE DETAILS:
The xsd is not generated from the xml file. It is provided by a client to guarantee that it covers all possible relationships. I understand that I can create an xsd in the SSIS XML Source but exporting a full data set each time there is a schema change
and then creating a new xsd file is not ideal, nor does it guarantee that all relationships will be correctly generated.
The Schema version does match the XML version (which is a bit suspect since I can still run xml files on the old schema w/o error)
QUESTIONS:
1. I have been unable to find an answer as to why this happens. Can anyone shed light on why the data is ignored? I've read that it's not an uncommon occurrence but have not season an answer on why. Getting an answer to this is probably
the most important.
2. My Options?:
a. I am not proficient in C# so i cannot script the import, plus there are over a 100 tables currently being generated. So I am ruling this out
b. This is my most likely approach: I will create an xsd from a large data set and then manually adjust any inconsistencies I find.Thank you Arthur
I previously tried testing w/ DataViewer. The issue is that no rows are retrieved or inserted so there is no data to view.
When I was referring to the versions I was really meaning each new release. These are important if there are element changes. Regardless, it does not seem to have an impact.
And I understand the problems w/o having concrete examples.
I found this article noting the issue and providing documents that should create the same issue. I did not test his documents since I know what the issue looks like.
But it's back to question #1 in that I have not been able to find any articles stating why. I would greatly appreciate any insite.
Here is the excerpt:
"In the below example, I am using sample "purchase order" and "customers and orders" XML files which can be downloaded from the MSDN
site: http://msdn.microsoft.com/en-us/library/bb387034.aspx andhttp://msdn.microsoft.com/en-us/library/bb387025.aspx respectively.
I also downloaded related XSD files at: http://msdn.microsoft.com/en-us/library/dd489284(v=vs.110).aspx and http://msdn.microsoft.com/en-us/library/bb675181.aspx.
Both of these XML files are moderately complex with several layers (or nested) values. Unfortunately, as an XML file's hierarchy structure and complexity increases, often times the supplied XSD file do not parse and load the data correctly. Often
the load will occur without error, however no data is transferred. Thus, the Generate XSD button will need to be used to generate a new XSD file to be used for importing. The Generate XSD process works well most often, but you may need to adjust it for
special cases within your XML file."
Here is the url: http://www.mssqltips.com/sqlservertip/3141/importing-xml-documents-using-sql-server-integration-services/ -
Using SSIS XML Source failing / renaming a node element
hello
I have tried to use SQL Server SSIS XML Source reader to load a file from one of our data providers to SQL Server however the reader fails with the following error:
The XML Muni File was unable to process the XML data. The element "default_status" cannot contain a child element. Content model is text only.
it seems that for some reason the reader fails to identify when the node and its child here labeled "default_status" have the same nomenclature.
I am reaching out to anyone with a solution for this - or a way to write an SQL XML script that renames the children of that node to "default_status_id" for example. then we can use the out of the box reader to load the file.
any ideas suggestion would be greatly appreciated.
thanks
eddy
eddy.ayou dont need to use SSIS here
you can simply use this
declare @x xml='<instrument_details>
<default_status>
<default_status>13</default_status>
<default_status_date>2013-12-24</default_status_date>
</default_status>
<default_status>
<default_status>2</default_status>
<default_status_date>2014-04-08</default_status_date>
</default_status>
<maturity_details>
<maturity_amount>10650000.0000000</maturity_amount>
</maturity_details>
<denomination_amounts>
<min_denom_amount>5000.000000</min_denom_amount>
</denomination_amounts>
</instrument_details>'
select t.u.value('(maturity_details/maturity_amount)[1]','decimal(10,2)'),
t.u.value('(denomination_amounts/min_denom_amount)[1]','decimal(10,2)'),
m.n.value('default_status[1]','int'),
m.n.value('default_status_date[1]','datetime')
from @x.nodes('/instrument_details') t(u)
cross apply u.nodes('default_status')m(n)
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Can we make Production Location as Partner Location for WM HU
Hi all,
Can anyone please tell me what can be the impact if Production Storage Location is assigned to warehouse Storage Location as Partner Storage Location since this is mandatory when setting the indicator HU reqquired in table V_T001L_L. This comes from Customizing Stock Transfer between storage Location.
Thanx in advance.Hi John,
Here is my pevious post
I have about 400 xml files with me and all this data has to be loaded in about 30 tables, Basically have 30 different varities of xml files and matching 30 xsd files. We were trying to load all this using "Data Flow Task" and "XML Source". Using
FOR Each Loop passing appropriate XML File and XSD to Data Flow task and load it in one shot. Rather than having 30 different Data Flow tasks. Is there any other way, we can accomplish this task using a loop and dynamically passing the different files.
You have suggested to follow the URL
There's some example code here for package generation here:
http://sqlsrvintegrationsrv.codeplex.com/releases/view/17647
Everywhere I see, they are suggesting to use Flat File or Excel data examples. Do you have any posting that can help me to use XML file as a dynamic input file for XML Source.
If anyone has any code samples how we can use XML files as dynamic source for XML Source task to import data into SQL Sever, that would be really appreciated.
Thanks -
Data Flow | XML Source | Very Slow with big files (over 1/2 a gig)
hi
I am trying to load a few XML files to a database. one of our proprietary systems load the file in 3-4 minutes however with ssis XML source file it takes over an hour.
can anyone know the reason/help with this?
I tried the delayValidation set to true with no success.
thanks
eddy
eddy.aParsing XML files as data sources in SSIS is not the most efficient. Remember that you have define a WSDL (aka structure of the input file) and once the XML source starts parsing the input file, it has to read every node at every level and make sure it conforms
to the structure defined in the WSDL file before it can start streaming the data out to the downstream components in your workflow.
A half-gig XML file with 150 nodes to parse is going to need some heavy-lifting behind the scenes before you start seeing the rows streamed out. I'd rather recommend that you use either inbuilt .Net classes for XML to parse and extract the data or leverage
SQL scripting to accomplish that. Alternatively, if your upstream system can instead drop the data feed in a flat file format, that'd be more preferable. And if you could hook into their data streaming APIs/end-points directly, that'll work too.
Hope this gets you started in finding the right approach.
- Muqadder. -
SSIS XML Data Source - worked in BIDS, can't read XML in SSDT
I have an SSIS 2008 package built in BIDS (2008) that uses a series of XML locations (similar to
http://corpslocks.usace.army.mil/lpwb/xml.tonnage?in_river=AG&in_lock=42&in_mon_yr=092013) to get tonnage information and load it into a SQL Server 2008 R2 database. This has been running daily without error for over 60 days. I am now migrating
this to SSIS 2012 using SQL Server Data Tools and I am having difficulty reading the XML into the database.
The package does the following (it is pretty simple):
1. read the URLs (there are 200) from a database view into a variable object
2. a for each loop container that loops through the variable object, gets the data from each URL (the XML URL is stored as a variable) and loads it into the database
The BIDS package still works great. I first used the converter to migrate to 2012. I then recreated a package with exactly the same settings as BIDS. No dice either way. I also tried using a local xsd file, then using one inline. SSDT will recognize all
of the columns correctly when I use inline, but neither method is capable of reading the data into a table.
I know the package is going to the addresses, all of the URLs show up in the error logs. The error messages are as follows: "[Load data from tonnage url [47]] Error: The file "http://corpslocks.usace.army.mil/lpwb/xml.tonnage?in_river=AG&in_lock=42&in_mon_yr=092013"
was not found. Please verify the file path and try again."
Has anyone run into this and solved it? I think I have tried every possible setting available, with no luck. Any ideas or suggestions are appreciated. Thanks!I have an update on this issue. I believe it is a connectivity issue or possibly a setting in SSDT.
I can access the remote XML file location through my browser. I have downloaded the XML from the remote location and my package runs using the local XML file perfectly. I have BIDS 2008 installed on the same machine and it works without a problem (using
the remote XML location). This last piece makes me think there is a network setting or something in SSDT.
Does anyone have any additional troubleshooting advice or other suggestions? My error output is included below.
Thanks!
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.
Error: 0xC020F440 at Data Flow Task, XML Source [31]: The file "http://corpslocks.usace.army.mil/lpwb/xml.lockqueue?in_river=GI&in_lock=01" was not found. Please verify the file path and try again.
Error: 0xC02090D0 at Data Flow Task, XML Source [31]: The XML Source was unable to read the XML data.
Error: 0xC0047019 at Data Flow Task, SSIS.Pipeline: XML Source failed the prepare phase and returned error code 0xC02090D0.
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "ADO NET Destination" wrote 0 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Data Flow Task -
Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.The Oracle documentation has a good overview of the options available
Generating XML Data from the Database
Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
You can also find some information in XML DB FAQ -
How can I validate the ejb-jar.xml against a downloaded ejb-jar_2_1.xsd
I downloaded all configuration XML file schema,
so we can point to the schema locally. (To be able to work
even the network is not there.)
I tried to change the xmlns, xmlns:xsi and xsi:schemaLocation in the root element of ejb-jar.xml file,
I can't figure out how to make the server load the local ejb-jar_2_1.xsd file.
I'll appreciate someone can explain how the xsd file is loaded.
Thanks
Zhongor use a tool like XMLSpy to validate your ejb-jar.xml against the XSD.
Cheers!
Dips -
Hi,
I would like to know as to how can I add links to open xml and csv files stored in another location? Please advice how to place links in my frame maker document?
Kindly advice.
Thanks
PriyaSpecial > Hypertext > Command "open document" will do its best to open the target document inside FrameMaker, which may not be much help; Special > Hypertext > Command "message …" will use the application you specify. The user guide for 7.0 says this about absolute links, and I don't think anything has changed since:
For example, to start PaintBrush and open the Ship.pcx file on drive C you would use the command message system pbrush.exe C:/Ship.pcx
I've not often used a relative link, and not recently: the same source says
folder levels are separated by a slash / even in Windows and Mac
[relative links] FrameMaker searches for a relative pathname beginning in the folder that contains the current document
[absolute links] FrameMaker searches for an absolute pathname beginning at the top of the file system. In Windows, the absolute pathname begins with the drive specifier, a colon and a slash. -
How to make xsd from xml file?
Hi,
i have one xml file which has many node and element.
anyone know how to make xsd from the xml file in order to make DT by using xsd ?
Thanks and Best Regards;
BangBangHI
there are multiple ways of doing this if you have XML based 3rd party tool with you.. you can search on Google also and will get many tools which can convert this to XSD..
few links with similar discussion..
How to convert XML file into DTD or XSD
XML to XSD
How to creste a XSD ?
Thanks,
Bhupesh -
How to pull the root level XML tags in the XML source-SSIS?
Hi All,
Can anyone please help out with the following requirement?
There is a XML file data which I need to pull it to database. Please see the attached XML file.
Question: When I am trying to pull the root level data (i.e. CreationDateTime and FileNumber) from XML source in the dataflow, the respective tag is not seen in the input. Can anyone help me how can I get those values in my input to pull the data to Database?
Thanks & Regards,
SriHi Sri,
In SQL Server Integrated Services, we can generate XML Schema (XSD) file based on a XML file with XML Source Editor. For more details, please refer to the following steps:
Double-click the XML Source in the Data Flow Task.
Browse the XML file for the XML location.
Click the Generate XSD button to generate an XSD file.
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
I am trying to hook my macbook pro to a projector, which has a VGA cable. I bought a VGA to HDMI adapter, but whenever I hook it up, the screen on my macbook just goes black and I can't make it do anything else or even show up on the projector.
My laptop is still on; it just has a black screen that I can't get rid of without shutting down the computer by holding the power button.Hey there lynmrigg,
It sounds like have an HDMI to VGA adapter connecting your MacBook Pro and your projector but the screen on your computer goes black and no image appears on the projector. I would use the troubleshooting in the following article to help resolve or isolate the issue here, named:
Apple computers: Troubleshooting issues with video on internal or external displays
Try unplugging the video adapter or cable and then plug it back in.
If more than one video adapter is in use (or "daisy-chained"), troubleshoot by using only one adapter.
Example: A mini DisplayPort to DVI adapter connected to a DVI to HDMI adapter is an unsupported configuration because there is a series of adapters in use.
If available, try using a different display and or adapter (or use a different connector by using DVI instead of VGA, for instance).
Reset the system
You can reset the Mac's parameter RAM and SMC.
Reset the resolution
Start by resetting the Mac's parameter RAM. If the display does not come up, was previously set to an unsupported resolution, and still results in no video:
Start up in Safe Mode.
From the Apple () menu, choose System Preferences.
Choose Displays from the View menu to open the preferences pane.
Select any resolution and refresh rate that your display supports.
Restart your computer.
Thank you for using Apple Support Communities.
Take care,
Sterling -
How can I make an audiobook purchased from another source show up in iTunes as an audiobook and not as music?
They chapters are mp3 files. Changing the genre to "audiobook" or "audiobooks" does help.
I am sure this question will come up a lot, since the book in question is "Harry Potter and the Deathly Hallows," purchased from Pottermore.com.The one thing I would add to the instructions above is that the "Media Kind" menu is on the "Option" pane in the "Get Info" Window. This procedure has allowed me not only to make imported audiobooks show up as audiobooks, but imported podcasts show up as podcasts.
-
Image coming from an xml source and on which we can't click...
Hi everybody !
Is it possible in LiveCycle Designer ES 8.2 (or in coming version of the software) to disable the click event on ImageField ?
I read that it is not possible yet but there is may be another solution to proceed to have an image coming from an xml source and on which we can't click.
Thanks.Hi,
Yes , you can disable image field by setting acces value to readOnly.
Example:
imageField1.access = "readOnly";
It works for Adobe Reader 9
Best regards,
Paul Butenko -
Can Encore make a Pal DVD from NTSC source?
Can Encore make a Pal DVD from NTSC source?
Convert NTSC <--> PAL http://forums.adobe.com/thread/995779
Regions and NTSC vs PAL http://forums.adobe.com/thread/951042
Maybe you are looking for
-
Pretty much last chance saloon for BT - Any help a...
A tale to tell. Around October last year, my internet connection dropped way down to unacceptable levels. After much toing and froing, this was finally resolved, and everything was fine again. Nowhere near the speed levels I was first promised, but a
-
BLS in MII Version 11.5 - HTML Loader with a HTTPS URL ASP Page
Greetings All, In my Business Logic, I have a need to scrape some information off of a Https Webpage but my HTML Loader is getting the following error: [ERROR]: HTMLLoader [https://midstream.epplp.com/standard/login.asp] : sun.security.validator.Vali
-
Error 1600 depends on what?
hey guys just wanted to know that if i try to restore my ipad 3 to 5.1.1 .. it shows error 1600,, so will it show this error if i try to restore to 6.0.1 which is the latest firmare?
-
Where can I buy a USB Cable for my iPod 2g Classic
Does anyone sell a USB Cable to connect a iPod 2nd a Generation to my Dell Computer?? I would like to get assess to iTunes with it!
-
Hi I have configured my E71 to my personal domain email a/c, but when sending mails out its only displaying my first name instead of the full name [First Name, Last Name]. Any clues