Which ETL method should be used - SQL Loader or External Table (OWB) [message #400597] |
Wed, 29 April 2009 00:56 |
dbguy
Messages: 3 Registered: April 2009
|
Junior Member |
|
|
I have a doubt regarding which ETL method will be useful and better for below given scenario
• We must present a solution with ORACLE 10G and Java.
• It is going to be created a Data Base in Oracle, that mainly is conformed by tables that are loaded from a files generated from others applications.
• Source files (mainly ".CSV" file) may correspond with two different target tables.
• The loadings of these files must be done with programmed tasks and through ETLs.
• Each loading done must generate a registry in a LOG which indicates the Success or Failure of the loading.
• In case of a failure, it must be sent an alert (can be a mail) to whom the bank indicates, informing the error.
• In any Success case or failure this LOG can be consultable.
As per my understanding, there are 2 ways to handle above given scenario in Oracle.
1. Using SQL Loader (need to write scripts and procedures)
2. Using External Tables (using OWB)
With this information, I hope you can suggest me which approach would be better. If any other information is needed, let me know.
While suggesting a solution, please also keep in mind that I am new to Oracle.
TIA.
|
|
|
|
|
Re: Which ETL method should be used - SQL Loader or External Table (OWB) [message #400646 is a reply to message #400638] |
Wed, 29 April 2009 03:49 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Ummm ... no, you have two SQL*Loaders. Once loading is done, you don't use it any more. It should / might be as follows:
SQL*Loader
CSV file ----------> target table or
SQL or PL/SQL procedure
CSV file (used as an external table) -----------------------> target table
"External table" is, actually, the "original" (CSV) file. You do create it (as an Oracle object), but don't "store values" in there.
SQL*Loader produces log file; it says whether everything was OK or not (for example, "5 records not loaded due to some errors") but you have to check it manually (or write some script that will do that for you).
(PL/)SQL procedure is simpler; basically, it might require just a simple query, such asINSERT INTO target_table
SELECT * FROM external_table; Of course, you may add additional logic, certain functions, exception handlers, blabla to the process, put everything into a PL/SQL procedure which will then send an e-mail etc. However, the main principle remains the same:
SQL*Loader or (PL/)SQL
CSV file ----------------------> target table
|
|
|
|
|
|