Overview
The ItaipuBDH import function (<importType>ItaipuBDH</importType>) imports data from the Itaipu API. (since 2021.01).
Example JSON file
DadoObservadoConsolidado
{ "DadoObservadoConsolidado": [ { "data": "2020-06-12T11:00:00-03:00", "dataConsolidacao": "2020-06-13T15:49:44.289-03:00", "estacao": { "codBDH": "UHEITAAFL", "codMiniBaciaAdjacente": 4680, "id": 1, "latitude": 0, "longitude": 0, "nome": "UHE Itaipu - Afluência", "tipoTransmissao": { "atrasoMedioMinutos": 0, "nome": "Não Definido" } }, "id": 20851044, "parametroUnidade": { "fatorConversao": 1, "id": 1, "parametro": { "id": 1, "nome": "VAZÃO" }, "sigla": "m3/s" }, "valor": 7791 } ] }
Mapped json fields
From the json fields, the following parts will be mapped to FEWS:
- DadoObservadoConsolidado.estacao.codBDH: location Id
DadoObservadoConsolidado: events
- DadoObservadoConsolidado.parametroUnidade.parametro.nome: parameter id.
- DadoObservadoConsolidado.parametroUnidade.sigla: paramter unit
- DadoObservadoConsolidado.valor: value of the parameter
Configuring the Import
De import type and have to be configured in the Import Configuration. A basic example where one location and parameter are imported can be seen in the following XML configuration.
For the password an api key has to be provided by Itaipu. For a complete example of the import configuration, see the following example:
Import Configuration
<?xml version="1.0" encoding="UTF-8"?> <timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd"> <import> <general> <importType>ItaipuBDH</importType> <serverUrl>http://dummy_hostname/BDH/api/rest</serverUrl> <connectionTimeOutMillis>100000</connectionTimeOutMillis> <user>token</user> <password>$ITAIPU_API_TOKEN$</password> <relativeViewPeriod unit="day" start="-1" end="1" startOverrulable="true" endOverrulable="true"/> <idMapId>IdImportBDH</idMapId> <missingValue>-999.0</missingValue> <importTimeZone> <timeZoneOffset>-03:00</timeZoneOffset> </importTimeZone> <dataFeedId>BDH</dataFeedId> <expiryTime unit="day" multiplier="90"/> </general> <timeSeriesSet> <moduleInstanceId>ImportBDH</moduleInstanceId> <valueType>scalar</valueType> <parameterId>P.obs</parameterId> <locationSetId>PARANA_P_1h</locationSetId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="hour" multiplier="1"/> <readWriteMode>add originals</readWriteMode> <synchLevel>1</synchLevel> </timeSeriesSet> </import> </timeSeriesImportRun>