• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] XML schema as output

#1 2011-02-17 12:20:22

ZeljkaMom
Member
Company: SRL Global , London
Registered: 2011-01-14
Posts: 148
Website

[resolved] XML schema as output

Tags: [CSV file, schema, xml, xsd]

Hi everyone,

I have manage to output my file in xml format and to csv format same fime.
However, now I need help to create xml format to look like as my XSD file.
In my orginal mapping and csv output I am having date in the format "20011-02-17" and if I do directly xml schem as what I am having in my mapping I am having xml output of date in the same format.

However, now I would like to split this date "2011-02-17" to be in the format as Year, Month, Date as seperat row like what I am having in my xsd file , see below:

Also I am having in my mapping colum for LongShor data and I would like my output in xml be split as Long one colum, L , Short , S all in different colum.. example below aswell..

If any chance I can do this even if I am not running full version of ToS I am on free one.

Thanks
Zeljka

---date format---

<xs:complexType name="NexusHistoricValue">
        <xs:simpleContent>
            <xs:extension base="xs:decimal">
                <xs:attribute name="year" type="xs:nonNegativeInteger" />
                <xs:attribute name="month" type="xs:positiveInteger" />
                <xs:attribute name="day" type="xs:positiveInteger" />
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
-----------------------------------------------------------------------------------------

--- LongShort format -----------------------------

<xs:element name="LongShort">
                <xs:simpleType>
                    <xs:restriction base="xs:normalizedString">
                        <xs:enumeration value="Long" />
                        <xs:enumeration value="L" />
                        <xs:enumeration value="Short" />
                        <xs:enumeration value="S" />
                    </xs:restriction>
                </xs:simpleType>

Offline

#2 2011-02-17 16:59:32

ZeljkaMom
Member
Company: SRL Global , London
Registered: 2011-01-14
Posts: 148
Website

Re: [resolved] XML schema as output

For my previously comment I would like to add this part of xml schema which show how my TransactionDate should look but my input is in the format " 2011-02-17"


Uploaded Images

Offline

#3 2011-02-18 11:32:51

shong
Talend team
Registered: 2007-08-29
Posts: 10305
Website

Re: [resolved] XML schema as output

Hi
The main problem in your case is to split this date "2011-02-17" to be in the format as Year, Month, Date, here I show you a way to split the date. see my screenshots

Best regards
Shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#4 2011-02-18 15:54:00

ZeljkaMom
Member
Company: SRL Global , London
Registered: 2011-01-14
Posts: 148
Website

Re: [resolved] XML schema as output

Hi Shong,

Your answere is helping a lot to understand how I will split my date format to single format as year, month, day ..

However, my schema is quite complex and I am having one file output in csv, and one xml where I want to split my date.

I am not sure how to fit your example in my work as I am having so many outputs and also mappings.

Please see and I hope you can give me quick advice where actaull I can fit tFixedFlowInput and tjavaFlex in my work.

Thanks
Zeljka


Uploaded Images

Offline

#5 2011-02-19 04:46:17

shong
Talend team
Registered: 2007-08-29
Posts: 10305
Website

Re: [resolved] XML schema as output

Hi
I use the tFixedFlowInput to generate a input flow, you don't need it in your case. If I understand your request well, you should put the tJavaFlex between tReplicate and tAdvancedFileOutputXML. First of all, you need know the basic usage of tJavaFlex.

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#6 2011-02-21 17:34:44

ZeljkaMom
Member
Company: SRL Global , London
Registered: 2011-01-14
Posts: 148
Website

Re: [resolved] XML schema as output

Hi Shong,

Thanks for advice my xml file is coming in right order.

Z

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] XML schema as output

Board footer

Powered by FluxBB