A control file controls what query is to be put and to which database. This file is designated in the LoadImport protocol in Config. See the example below where ExcelimportConfiguration.ini is designated as the control file for the import.
In the ExcelimportConfiguration.ini example, to read from an Excel sheet, the control file may look like this. The control file describes the look of the Excel sheet that the protocol is to be read from. Columns with the name “Date”, “Time” are singled out, as well as that data is to be read from the sheet called “sheet1”. Source indicates the Excel document, which in the example is in folder C:\Aiolos\Tmp\Import\.
In the example, REF3 is used in the database to designate the import name of the series. The order of the columns in the Excel sheet is of no significance. The protocol will search out each and every import name that is in REF3 in the table of forecast series in the Aiolos database and will import data into the column that matches the import name. Do not use special characters as a part of the import name such as operators or dot.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Aiolos\Tmp\Import\LoadConsumption.xlsx; Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"
@DATEFORMAT=yyyy-MM-dd HH:mm
<SQL0>
SELECT FORMAT(Date & ' ' & Time,'yyyy-MM-dd HH:00'), [%REF3%] FROM [sheet1$]
WHERE [%REF3%] <> Null AND Date <> Null AND Time <> Null
ORDER BY Date & ' ' & Time
</SQL0>
The SQL import protocol supports multiple columns of data from the text document to be imported into the same aio-file.
The column indices to import are set in the sql query. Within the tab <sql0> </sql0> the query for the first column is set. To import multiple columns into the aio-file use <sql1>, <sql2>, and so on.
An example of multiple columns is when importing both production and availability data into an .aio8-file. Here the production sql query is set in the tab <sql0> </sql0> and the availability query is set in <sql1> </sql1>.