Bulk load, transform problem
From: Richard R (rrose_at_informsnospam.co.uk)
Date: 05/10/04
- Next message: Stoffe: "Problem with idref when updating from SQLXML 3.0 to SQLXML 3.0 Sp2"
- Previous message: jnc: "Re: Mapping Elements to Database Fields in XSD for Bulkload"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 15:18:31 +0100
Hi All,
I have to retrieve some information that I have received in XML, and convert
it to a simple table in SQL.
I am using the SQLXMLBulkLoad object in a DTS package, and while I can get
the samples working I am really
struggling to get the mapping for my XML document, which is somewhat more
complex than their
examples.
In particular I don't understand how to map down several nested elements to
retrieve the one item
I actaully need. I thought I did...
If anyone can show me what the mapping xml file should be I would be very
grateful indeed., as the alternative is to manually re-type a few hundred of
these.
Details of the input XML and required output rowset are given below.
Thanks in advance,
Richard
---
The XML represents part of ProClarity briefing book (not that that matters).
Within this there are several calculated members (Element
<CalculatedMember>)
each of which is composed of multiple Members (Element <Member>. )
This effectively encodes a one-to-many relationship, which is what I want to
retrieve into a SQL table.
The XML is as follows:
<BriefingPage3>
<ConnectionInfo>
<Provider Name="{a07ccd0c-8148-11d0-87bb-00c04fc33942}" Caption="MSOLAP"/>
<Server Name="ERIC"/>
<Catalog Name="Catalog1"/>
<Cube Name="[Cube1]" Caption="Cube1G"/>
<Schema Name=""/>
</ConnectionInfo>
<Commands>
<Command UsingDecoratedNames="Yes" SlicerConversion="No" Active="DSH">
<CommandSettings/>
<MDX> A great big string of MDX in here </MDX>
<DDLObjects>
<CalculatedMember Version="1" Name="[<##<MEMBER!RichardR!A M
Searle>##>]" ... />
<DDLObjects UsingDecoratedNames="Yes"/>
<MemberSet>
<Member>
<Member Name="[Hauliers].[Standard
Name].&[SEARLES].&[SEARLES].&[SEARL]" MDID="35"/>
</Member>
<Member>
<Member Name="[Hauliers].[Standard
Name].&[SEARLES].&[SEARLES].&[SEARL AM]" MDID="36"/>
</Member>
<Member>
<Member Name="[Hauliers].[Standard
Name].&[SEARLES].&[SEARLES].&[SEARL A]" MDID="37"/>
</Member>
....
What I want to retrieve from this is a table with the Name attribute of the
CalculatedMember element, and the
Name and MDID attributes of the lower Member element:
Name
MemberName
MDID
-----
----------
----
[<##<MEMBER!RichardR!A M Searle>##>] [Hauliers].[Standard
Name].&[SEARLES].&[SEARLES].&[SEARL] 36
[<##<MEMBER!RichardR!A M Searle>##>] [Hauliers].[Standard
Name].&[SEARLES].&[SEARLES].&[SEARL AM] 37
[<##<MEMBER!RichardR!A M Searle>##>] [Hauliers].[Standard
Name].&[SEARLES].&[SEARLES].&[SEARL A] 38
>From here I can get to what I actually want, which is
Name MemberName MDID
---- ----------- -------
A M Searle SEARL 36
A M Searle SEARL AM 37
A M Searle SEARL A 38
- Next message: Stoffe: "Problem with idref when updating from SQLXML 3.0 to SQLXML 3.0 Sp2"
- Previous message: jnc: "Re: Mapping Elements to Database Fields in XSD for Bulkload"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|