> From: Tony Gravagno
>> ...To me, the U2 box is just one end of the equation,
>> it's not the middle tier. The U2 side of things uses just grunt
code or
>> dict items that any of us here can write.
> From: Wjhonson
> The nature Tony of code 8sharing8 between users of this group, is
Free.
> I share my code, others share their code.
> No one puts everything they've written on pickwiki So it's entirely
> possible someone has written a general purpose ETL to go into
> Universe
>
> I'm confused about your mention of Dict items because I don't see
> how you use Dict items for Uploading. I see how you use them for
> Downloading. Maybe you could give an example of why you would
> read the Dict for an upload.
In a public forum we discuss options. That doesn't necessarily mean
you're going to get a complete solution, or a completely free one. The
irony of your inquiries is that even when people give you complete and
completely free solutions, you tend to argue with them and change the
scope of the request. So my approach with you is simply to provide a
fishing line and point to where the fishing is good, and leave it to
you to catch your own fish. We've discussed this many times over the
years...
Anyway, to answer your question, depending on what the remote source
is you can use local dict items as a schema for validating data. Part
of the ETL process often involves data validation and/or cleansing. In
a homegrown solution you can provide the exact same data that is
required for a relational database, the table, key, and field names,
and loop to process inbound data. For a simple solution just read the
dict items, get the attribute number, and you now know where to put
the data. The point here is that the external interface doesn't need
to know that the CustomerName data is in attribute 2, it just
provides a column name and the data and your code works out where it
goes.
Since you asked, I'll also hop into my salesman shoes with an [AD]:
mv.NET includes a feature called Solution Objects where strongly typed
class libraries (DAL and BAL) are generated using U2 file
dictionaries. If the ETL code is abstracted to a middle tier, you can
use a class like this to load your data using simple object instances:
var sourceData = GetDataFromWherever(mySpecs);
for(var rnum =0; rnum+=1; rnum<sourceData.Count) {
var source = sourceData[rnum];
var toU2 = new Customer() {
Name = source.CustName,
Balance = source.AccountBal,
LastPaymentDate = source.LDate, ...
}
toU2.Save();
}
The Customer class and properties were generated from dict items, and
an exception will be thrown if the data is bad, thus providing some
level of data integrity. The data can be saved directly into the file,
or the Save method can be configured to execute a BASIC program which
further processes the data into the right format and locations. I will
be happy to consult with developers toward creation of solutions as
described here.
[/AD]
Once again, the solution depends on a proper definition of the problem
to be solved. The above code pattern can be used to move data from
_anywhere_ into U2, which is a valid response to your general query.
Now, as usual, feel free to change the scope of the problem to
completely invalidate the responses provided thus far.
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula R&D sells mv.NET worldwide
and provides related development services
http://Nebula-RnD.com/blog
Visit http://PickWiki.com! Contribute!
http://Twitter.com/TonyGravagno
http://groups.google.com/group/mvdbms/about
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users