xsd sql schema relation problem bulk load - self join



Here is a snippet of my xml (based on the ecb daily) and with xmlns removed:

<?xml version="1.0" encoding="UTF-8"?>
<gesmes>
<Cube>
<Cube time='2006-11-01'>
<Cube currency='USD' rate='1.2757'/>
<Cube currency='JPY' rate='149.24'/>
<Cube currency='CYP' rate='0.5770'/>
<Cube currency='CZK' rate='28.066'/>
<Cube currency='DKK' rate='7.4547'/>
</Cube>
</Cube>
</gesmes>

Here is my xsd:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="curr_fixing1"
parent="curr_fixing"
parent-key="px_date"
child="curr_fixing"
child-key="px_date" inverse="true" />
</xsd:appinfo>
</xsd:annotation>

<xsd:element name="gesmes" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>

<xsd:element name="Cube" sql:is-constant="1" >
<xsd:complexType>
<xsd:sequence>

<xsd:element name="Cube" sql:relation="curr_fixing" nillable
="false">
<xsd:complexType>
<xsd:sequence>

<xsd:element name="Cube" sql:relation="curr_fixing"
nillable ="false" sql:relationship="curr_fixing1" maxOccurs="unbounded">
<xsd:complexType>

<xsd:attribute name="currency" sql:field="curr_code"
type="xsd:string" use="required"/>
<xsd:attribute name="rate" sql:field="curr_fix"
type="xsd:string" use="required"/>

</xsd:complexType>
</xsd:element>

</xsd:sequence>
<xsd:attribute name="time" sql:field="px_date"
type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>

</xsd:sequence>
</xsd:complexType>
</xsd:element>

</xsd:sequence>
</xsd:complexType>
</xsd:element>

</xsd:schema>

Here is my table:
px_date curr_code curr_fix
2006-11-01 USD 1.2757
2006-11-01 JPY 149.24
2006-11-01 CYP 0.577
2006-11-01 CZK 28.066
2006-11-01 DKK 7.4547
2006-11-01 NULL NULL

vbscript then bulk loads and executes xml and schema.

This is perfect apart from the last row with NULLs, I've looked at different
ways of doing this, I'm not sure what I'm doing wrong. I need to specify the
relationship on the last Cube element as the one before is set to relation on
the table. But since both elements map to the same table its creating a
problem. So I created a relationship which self joins, but this seems to be
creating the last join back on the last attribute which is a null. There
must be some setting to stop nulls. I've tried using nillable, but this
doesn't seem to work as it isn't the xml with nill values the join is
creating this. Any ideas?
.



Relevant Pages

  • Re: Display a pivot table with xml data
    ... As U said I dont have a cube but table data in a data structure, ... I wanted to display a pivot table with the data I have on my SAP web ... I am going with html so that I can make use of office web component to ... I assume xml would be the best option for loading data, ...
    (microsoft.public.office.developer.web.components)
  • Re: MS Visual studio - Cube design - Calculations are not available!
    ... Sometimes you need to edit the XML directly, ... the cube to XML into a window. ... Edit out the problem (try to determine ... then re-run the script. ...
    (microsoft.public.sqlserver.olap)
  • Re: Connecting to Analysis Sevices through a Java Program
    ... This allows you to get data from an AS cube over http or https with a ... SOAP-wrapped XML message. ... to access data from a cube that has already been built in Analysis Services. ...
    (microsoft.public.sqlserver.olap)
  • RE: OWC Question - Correction to my Original Post.
    ... OWC uses Alphabetical ordering for Measures. ... > I looked on the Cube side in Analysis Manager and the OrdinalPosition ... > I also tried changing the XML we have so the ordering of measures is what I ... > To give a brief background of how we use OWC, we store the user selections ...
    (microsoft.public.sqlserver.olap)
  • Re: Finding NULLs in untyped DataSet
    ... The problem here is there is no concept of null in XML, ... There is a concept of an empty tag, ... the "nulls". ... > I'm importing data from an Excel file into an untyped DataSet. ...
    (microsoft.public.dotnet.framework.adonet)

Loading