Open j99ht opened 8 years ago
Putting @fgalan in the loop, since he's the expert on Orion... I'm not sure if a, let's say, composed value is valid in Orion and thus, in Cygnus. AFAIK, the value of an attribute in Orion must be a valid Json (i.e. a basic type, a string, an object or an array).
@fgalan is out, so I will try to help out in his absence ...
The value described:
"value": "LATITUDE","LONGITUDE"
exactly like that, is not supported, of course. It's not even correct JSON. A value for geo:point must be as follows:
"value": "LATITUDE, LONGITUDE"
One example:
"attr1": {
"value": "10.0, 10.1",
"type": "geo:point"
}
Now, was this just a typo, or is it the source of the problem?
Cygnus was complaining about the value used by @j99ht... the problem was I was not sure if Orion accepted such a value. Now we know it is not valid for Orion, it is clear the warning raised by Cygnus is correct :) Thanks @kzangeli !
Just fixed, but same error. This is the log in Cygnus for that value
'10.0,10.0'
I have converted PostgreSQL Point type (not supported by GeoServer) to Geometry Point and now the error is the following
Bad context data (ERROR: Invalid hex string, length (3) has to be a multiple of two!
I'll try to reproduce these errors ASAP and I'll go for you with a response.
This issue seems to be the same than the one in this SOF question: http://stackoverflow.com/questions/35337477/fiware-cygnus-error-invalid-input-syntax-for-type-point
@j99ht , have you configured attr_persistence=row
or attr_persistence=column
? If it is the second one, can you share the create table command you used? Thanks!
I have configured column.
Please see below CREATE TABLE ct_stc.def_servpath ( id serial NOT NULL, recvtime text, fiwareservicepath text, entityid text, entitytype text, altitude text, altitude_md text, batterylevel text, batterylevel_md text, ch4 text, ch4_md text, ch4_cal text, ch4_cal_md text, cl2 text, cl2_md text, cl2_cal text, cl2_cal_md text, co text, co_md text, co_cal text, co_cal_md text, co2 text, co2_md text, co2_cal text, co2_cal_md text, eto text, eto_md text, "position" geometry(Point,4326), eto_cal text, eto_cal_md text, h2 text, h2_md text, h2_cal text, h2_cal_md text, h2s text, h2s_md text, h2s_cal text, h2s_cal_md text, hcl text, hcl_md text, hcl_cal text, hcl_cal_md text, hcn text, hcn_md text, hcn_cal text, hcn_cal_md text, humidity text, humidity_md text, pressure text, pressure_md text, temperature text, temperature_md text, latitude text, latitude_md text, longitude text, longitude_md text, nh3 text, nh3_md text, nh3_cal text, nh3_cal_md text, no2 text, no2_md text, no2_cal text, no2_cal_md text, nox text, nox_md text, nox_cal text, nox_cal_md text, o2 text, o2_md text, o2_cal text, o2_cal_md text, o3 text, o3_md text, o3_cal text, o3_cal_md text, ph3 text, ph3_md text, ph3_cal text, ph3_cal_md text, pm10 text, pm10_md text, pm10_cal text, pm10_cal_md text, pm25 text, pm25_md text, pm25_cal text, pm25_cal_md text, pm1 text, pm1_md text, pm1_cal text, pm1_cal_md text, humiditycal text, humiditycal_md text, pressurecal text, pressurecal_md text, temperaturecal text, temperaturecal_md text, timestamp_1 text, timestamp_md text, so2 text, so2_md text, so2_cal text, so2_cal_md text, serial text, serial_md text, speed text, speed_md text, position_md text, CONSTRAINT def_servpath_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE ct_stc.def_servpath OWNER TO stc;
Thanks
2016-02-23 16:01 GMT+01:00 Francisco Romero notifications@github.com:
@j99ht https://github.com/j99ht , have you configured attr_persistence=row or attr_persistence=column? If it is the second one, can you share the create table command you used? Thanks!
— Reply to this email directly or view it on GitHub https://github.com/telefonicaid/fiware-cygnus/issues/772#issuecomment-187730993 .
I have an attribute in Orion with type Point, as follows,
and Cygnus is subscribed to Orion. When Cygnus PostgreSQLSink is receiving the event and it tries to store it in the PostgreSQL database I'm getting the following error
WARN sinks.OrionSink: Bad context data (ERROR: invalid input syntax for type point: "[]"
Should I use GeoJSON in Orion?