The project goal is develop a VBScript which downloads certain (XML) files from [login to view URL] through Entsoe’s API ([login to view URL]). The files should be then processed and uploaded to an Oracle database via ODBC interface.
The project steps are:
#1 - Download the specified files (the URLs are listed with parameters in Oracle – example code is available)
#2 - Move (or some case unzip) the files into a temporary folder
#3 - Read from the temp folder each and every file and process the XML tree
#4 - Upload the XML elements and it’s values into an Oracle table via ODBC
There isn’t an exact match between the target Oracle table and the source XML. Some of the XML elements are excluded, and some has different names – the script should use a dictionary table (which also have to be designed under the project scope) to assign the XML elements to the table fields.
The coding should meet the following criteria
> The coding should be clean, easy to understand and well structured
> Each function should have a comment section in its header, describing its parameters and the output
> There should be a debug option in the code (a constant) where the XML files aren’t uploaded into Oracle, but converted into XLS files (the XML tree in this case is simply just flattened out).
> The code should be general in terms of:
.. The files / URLs to download can be changed
.. The dictionary table should be easily editable (via SQL)