gnue-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnue-dev] a sample GNUe Mapping Definition


From: Jason Cater
Subject: Re: [Gnue-dev] a sample GNUe Mapping Definition
Date: Wed, 13 Nov 2002 18:16:01 -0600

Jan, a few questions: 

1. What is the purpose of <input> and <output> ?? 

2. Why a separate <process> tag? Why not keep it part of <mapping>.
Isn't <mapping> defining a single process/map/transaction?

3. Do you think <merge> and <split> leave enough flexibility? How would
you handle getting: 

   Memphis, TN 38117 

into city, state, zip? I assume a trigger of some sort. 

4. Aren't merges, splits too different from one situation to the next to
try to define a tag for them? Perhaps merges and splits should be
handled only by triggers? Otherwise we'll end up with tons of "options"
to the <merge> and <split> tags. I'm torn on this one. 

5. How will this handle "un-formatting" data? e.g., I have a lot of
sources where they have the dollar fields as "$12.12". This, of course,
needs to be converted to a numeric 12.12.   Dates and commified numbers
are more good examples. 

Anyway, it's a start. 

-- Jason



> This is a sample mapping definition. It just the first idea.
> There is still some stuff missing (definitions about merging/spliting
> rows,...) and some stuff is defined twice (datasources).
> 
> Nevertheless the file format should allow some standart
> datasource->datasource mappings without needing triggers.
> 
> Jan
> -- 
> 

<mappings title="A first test">
  <sources>
    <datasource name="in" table="testinp" database="gnue"/> 
    <datasource name="out" table="testout" database="gnue"/>
  </sources>
  <mapping id="no" title="simple Mapping">
    <input> 
       <datasource name="in" table="testinp" database="gnue"/> 
    </input>
    <output>
       <datasource name="out" table="testout" database="gnue"/>
    </output>
    <process rowmapping="merge|split|simple">
       <copy from="zipcode" to="zipcode"/>
       <copy from="state" fromdts="in" to="state" todts="state"/>
       <merge delimiter=" " into="address">
          <mergefield name="street"/>
          <mergefield name="no."/>
       </merge>
       <split from="name" delimiter=" ">
           <splitfield name="firstname"/>
           <splitfield name="lastname"/>
       </split>
       <trigger type="POST-ROW">
           ...
       </trigger>
       <trigger type="PRE-ROW">
           ...
       </trigger>
    </process>   
  </mapping>
  <mapping title="XXX" id="ar">
    <submapping>
    </submapping>
  </mapping>
</mappings>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]