Target file schema.

Scenario is:

I have a source…any format.
I want a target file (say in csv or FF).Its structure is available in .xml file i.e. (Metadata for target file).
I want to create empty target file (csv or FF) using .xml file,So that I can get colunm names and their datatypes in target files.
Now the target file is ready to get data ETLed from source file.

My query is:
I want to import the metadata of target from .xml file to target csv or file format.

Can we do this using BODI? If yes,How??

**Target file details(colunm names and respective datatypes) are known but not the source file.
Please provide me the solution so that I can proceed further in my project.

Thanks in Advance.
Archana


archana.mankar :india: (BOB member since 2009-08-03)

Hi Archana

Do you have the XSD for that XML file?


ganeshxp :us: (BOB member since 2008-07-17)

Hi Ganesh,

Thanks for your reply.
Yes I have the xsd for xml file…
Here xml file is empty there is no data to be transformed into target table but only the structure.

Hope You got my query correctly.

regards,
Archana


archana.mankar :india: (BOB member since 2009-08-03)

Okay then follow the below steps and let me know if you are able to achive the Target Flat File Format
–> In File Format --> XML Schemas --> Right-Click and select NEW
–> Give the path of the .xsd file and give the Root Element
–> Now add this XML File Format as “Make XML File Source”
–> Add a Query Transform (say Query_1)
–> Here drag and drop the root element from left pane to right pane
–> Select the root element and give “Un-nest with Sub Schemas”
–> Now add a 2nd Query Transform (say Query_2)
–> Drag and drop all the items into the right pane
–> Now right-click on the Query name (at the top of Right Pane) and select “Create File Format…”

Now you can see all the Columns Headers populated and appropriate Datatypes get populated automatically!!!

I hope this is what you expect. Let me know if this is what your requirement.


ganeshxp :us: (BOB member since 2008-07-17)

Hi Ganesh,

I could not get after the step :
–> Here drag and drop the root element from left pane to right pane.

Can u please explain?

Thanks in advance.
Archana


archana.mankar :india: (BOB member since 2009-08-03)

Hi,

How many levels of nesting you have?

If the source is xsd you should be able to do this yaar.

Something your .xsd or a screenshot of the step you got struck can you post please?


ganeshxp :us: (BOB member since 2008-07-17)