Closed dcesari closed 7 years ago
Maybe the second problem "no low-level information available" can be ignored because it does not apply to dbadb
command, but dbadb import -t json --wipe-first
also gives the first error on pressure as dbamsg
.
Which version of dballe are you using?
dballe-7.21-1.x86_64
Ok, I found the problem: when an integer is set on a variable with scale != 0, the value is considered as the value with the scale already applied (for the internal conversion from decimal to integer).
When scale < 0, the method wreport::Var::format()
(invoked by the JSON serializer) format the value as an integer. Therefore, the JSON reader cannot rely on the presence of a decimal or integer notation: every value must be treated as a string and set with wreport::Var::setd()
.
dbamsg dump -t json vprof_modified.json
#1 message: 1 subsets: 1 generic: no low-level information available
This problem is not fixed, I will open another issue.
@dcesari the same thing happens with CSV format.
$ dbamsg dump vprof.bufr --csv --interpreted | dbamsg dump -t csv
#1 message: 1 subsets: 1 generic: no low-level information available
dbamsg
need a "binary" (BUFR, AOF, CREX) representation of the input message. Feel free to open an issue if you want to convert JSON or CSV messages in other formats without using dbadb
.
Importing a json exported by dbamsg dump --json does not work, apparently for two different reasons:
while 17590 comes from
which is an acceptable atmospheric pressure. Replacing
17590
by17590.
and the same for all subsequent pressure values the error becomes:vprof.bufr.gz vprof_modified.json.gz