Importación datos

Post Reply
barmoreno
Newbie
Newbie
Posts: 4
Joined: Mon Sep 18, 2017 3:57 pm
Station model: WH1080
Software: Cumulus

Importación datos

Post by barmoreno » Thu Sep 21, 2017 7:57 am

Tengo instalada la plantilla en un dominio y ahora quiero a la vez tenerla en otro. Ya la tengo configurada la nueva y funciona correctamente. Pero quiero importar los datos de la primitiva para tener las dos actualizadas.

He exportado la base de datos de la primera pero luego al importar en la segunda me da estos errores:

There seems to be a problem with the date and time. Either it has not been parsed correctly or it is a date/time in the future! Check the format you specified and also the actual values.

Éste primero parece que es de hora, pero tienen las dos configurada la misma hora y en el mismo formato.

El segundo error es de presión:

Pressure is outside the allowed limits! Pressure value will be ignored!

Pero no hay ningún dato que esté fuera de los límites establecidos.

¿Alguién me puede indicar la solución?

User avatar
iatros
Language Admin
Language Admin
Posts: 145
Joined: Mon Aug 21, 2017 5:56 am
Location: Flims Waldhaus Switzerland
Station model: Davis Pro 2 6163
Software: Meteobridge
Contact:

Re: Importación datos

Post by iatros » Fri Sep 22, 2017 6:24 am

Hello barmoreno

stupid idea: did you double check the pressure limits (and the date format) in the Main settings (as Jachym describes it under "variables" on the data import page)?
Could you then post a few lines of the file with the data you'd like to import?

greetings, Martin
Image

Language Admin für Deutsch

barmoreno
Newbie
Newbie
Posts: 4
Joined: Mon Sep 18, 2017 3:57 pm
Station model: WH1080
Software: Cumulus

Re: Importación datos

Post by barmoreno » Fri Sep 22, 2017 7:43 am


User avatar
iatros
Language Admin
Language Admin
Posts: 145
Joined: Mon Aug 21, 2017 5:56 am
Location: Flims Waldhaus Switzerland
Station model: Davis Pro 2 6163
Software: Meteobridge
Contact:

Re: Importación datos

Post by iatros » Fri Sep 22, 2017 10:22 am

sorry barmoreno, this link does not work...
Image

Language Admin für Deutsch

barmoreno
Newbie
Newbie
Posts: 4
Joined: Mon Sep 18, 2017 3:57 pm
Station model: WH1080
Software: Cumulus

Re: Importación datos

Post by barmoreno » Mon Sep 25, 2017 5:54 am

Perdón el link estaba mal.

El bueno es éste:

http://www.bartolomemoreno.com/meteo/alldata2017.csv

User avatar
iatros
Language Admin
Language Admin
Posts: 145
Joined: Mon Aug 21, 2017 5:56 am
Location: Flims Waldhaus Switzerland
Station model: Davis Pro 2 6163
Software: Meteobridge
Contact:

Re: Importación datos

Post by iatros » Mon Sep 25, 2017 11:49 am

Now it's ok.
can you indicate the column headers?
Image

Language Admin für Deutsch

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: Importación datos

Post by Luc » Mon Sep 25, 2017 10:10 pm

Maybe this helps... (Tal vez esto ayuda ...)

Supongamos que usted está en una situación en la que tiene una copia de seguridad de todos los años de su tabla alldata y desea comenzar todo
(en un nuevo servidor web por ejemplo) con la importación de los datos backupped en una nueva tabla alldata creada.

Cuando realiza una copia de seguridad de la base de datos de un año determinado (por ejemplo, 2017) con el panel de control - Copia de seguridad - 2017 - Aceptar
se creará el siguiente archivo de copia de seguridad: [template_home] / backup / [date] db / alldata [year] .csv.
En mi caso, este sería el siguiente fichero: http://www.lucdesign.nl/template/backup ... ta2017.csv

Siga las instrucciones a continuación para importar estos archivos csv del año en una nueva tabla de alldata creada.

Inicio Panel de control - Base de datos - Importación de datos

"Importación de datos desde archivo txt / CSV"
Utilice los siguientes ajustes:

URL: ../backup/20170917db/alldata2017.csv (defina la fecha y el nombre del archivo del año para su situación)
Delimitador de campo:, (coma)
Separador decimal: . (período)
Fila del encabezado: No
Tipo de importación: Omitir existente
Campos de fecha y hora: Fecha y hora en un solo campo
Número de campo de fecha y hora: 0
Formato de fecha y hora: "Y-m-d H:i:s"
Números de campo:
Temperatura: 1
Humedad: 4
Presión: 11
Velocidad del viento: 6
Ráfagas de viento: 7
Precipitación diaria acumulada: 10
Índice de lluvia: 9
Dirección del viento: NNE
Radiación solar: Activado / Desactivado 12
Realice una "Importación de prueba"
Si todo parece bien, haga un 'Importar datos'

Cambie la URL a otro archivo de año y vuelva a hacer un 'Importar datos'.
Repita esto para todos los archivos de copia de seguridad del año guardado.

¡Éxito!

=======================================================================
(My original text in English)

Suppose you are in a situation that you have a backup of all years of your alldata table and you want to start all over
(on a new webserver for instance) with importing the backupped data in a new created alldata table.

When you perform a database backup of a certain year (e.g. 2017) with Control panel - Backup - 2017 - OK
there will be created the following backup file: [template_home]/backup/[date]db/alldata[year].csv.
In my case this would be the following file: http://www.lucdesign.nl/template/backup ... ta2017.csv

Follow the instructions below to import these year csv-files into a new created alldata table.

Start Control panel - Database - Data import

"Data Import from txt/CSV file"
Use the following settings:

URL: ../backup/20170917db/alldata2017.csv (set the date and the year file name for your situation)
Field delimiter: , (comma)
Decimal separator: . (period)
Header Row: No
Import type: Skip existing
Date and time fields: Date and time in a single field
Date and time field number: 0
Date and time format: "Y-m-d H:i:s" (check the date format in your backupped files, may be you need "Y/m/d H:i:s")
Field numbers:
Temperature: 1
Humidity: 4
Pressure: 11
Wind speed: 6
Wind gust: 7
Cumulative daily precipitation: 10
Rain rate: 9
Wind direction: 8
Solar radiation: Enabled/Disabled 12
Perform a 'Test Import'
If all looks OK do an 'Import Data'

Change the URL to another year file and do again an 'Import Data'.
Repeat this for all saved year backup files.

Success!
Image

barmoreno
Newbie
Newbie
Posts: 4
Joined: Mon Sep 18, 2017 3:57 pm
Station model: WH1080
Software: Cumulus

Re: Importación datos

Post by barmoreno » Fri Sep 29, 2017 7:59 am

No funciona: Me da este resultado

Testing CSV/text file...

Errors will be highlighted in red...

Loading CSV/text file from http://www.bartolome.com/meteo/alldata2017.csv

File loaded successfully.
No header, reading from first line.

The tested file has 46 data sets. This import test will load only the first line.


Starting to parse data.

Loading line 0...
Separating fields...
Decimal separator is a period, no need to do anything, can be parsed by PHP.
The data row contains 1 fields.

Parsing date and time...Date and time in a single field.
MySQL accepts date and time in format YYYY-MM-DD HH:MM, the parsed date and time is:


Parsing variables...

Temperature
Raw value:
Database temperature units: C
File temperature units: C
Same units, no need to do any conversion.
Final temperature value: 0.0 C

Humidity
Final humidity value: %

Pressure
Raw value:
Database pressure units: hpa
File pressure units: hpa
Same units, no need to do any conversion.
Final pressure value: 0.00 hpa

Wind speed
Raw value:
Database wind speed units: kmh
File wind speed units: kmh
Same units, no need to do any conversion.
Final wind speed value: 0.0 kmh

Wind gust
Raw value:
Database wind speed units: kmh
File wind gust units: kmh
Same units, no need to do any conversion.
Final wind speed value: 0.0 kmh

Precipitation
Raw value:
Database precipitation units: mm
File precipitation units: mm
Same units, no need to do any conversion.
Final precipitation value: 0.00 mm

Rain rate
Raw value:
Database precipitation units: mm/h
Rain rate is saved in the database in units per hour.
File rain rate units: mm
Same units, no need to do any conversion.
Final rain rate value: 0.00 mm/h

Wind direction
Final wind direction value: degrees

Solar sensor enabled in main settings, reading data...
Solar radiation
Final solar radiation value: W/m2


Parsing line 0 finished.
Checking validity of data based on your limits in Main settings...
Checking date and time...
There seems to be a problem with the date and time. Either it has not been parsed correctly or it is a date/time in the future! Check the format you specified and also the actual values.
Minimum temperature allowed: -100 C
Maximum temperature allowed: 100 C
Temperature OK.
Minimum humidity allowed: 0 %
Maximum humidity allowed: 100 %
Humidity OK.
Minimum pressure allowed: 950 hpa
Maximum pressure allowed: 1100 hpa
Pressure is outside the allowed limits! Pressure value will be ignored!
Minimum wind speed allowed: 0 kmh
Maximum wind speed allowed: 200 kmh
Wind speed OK.
Minimum wind gust allowed: 0 kmh
Maximum wind gust allowed: 200 kmh
Wind gust OK.
Minimum daily precipitation allowed: 0 mm
Maximum daily precipitation allowed: 200 mm
Daily precipitation OK.
Minimum rain rate allowed: 0 mm/h
Maximum rain rate allowed: 500 mm/h
Rain rate OK.
Minimum wind direction allowed: 0 degrees
Maximum wind direction allowed: 360 degrees
Wind direction OK.
Minimum solar radiation allowed: 0 W/m2
Maximum solar radiation allowed: 2000 W/m2
Solar radiation OK.

Calculating dew point based on parsed values...
Temperature and humidity both valid... converting and calculating dew point....
Dew point calculated: -112 C
Calculating apparent temperature based on parsed values...
Temperature, humidity, and wind speed all valid... converting and calculating apparent temperature....
Apparent temperature calculated: -4 C

Summary
There is a problem with the date and time, nothing would be imported. Check the date/time format you specified and the actual values in the file.




--- END ----

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: Importación datos

Post by Luc » Fri Sep 29, 2017 10:04 am

The path to your csv file is not good. No file is found (the import program says a file is found, but that is an error).
What is the link to your meteotemplate site?
Image

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: Importación datos

Post by Luc » Fri Sep 29, 2017 10:11 am

Image

Post Reply