-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL error: md_ets_metadata when trying tutorial docker setup #750
Comments
Hi @derteufelqwe, I suggest to use the "orchestracities/quantumleap:edge" according to #742. Edit. Since the new version 1.0.0 was released 3 days ago, I guess you pulled that image? |
Besides: Did you even push any data to QL? According to your described steps, you do not push any data to Orion so that a notification could be triggered. |
Thanks @SBlechmann, You are correct, I never pushed any data. Where would I send sensor values when I have the following subscription? POST localhost:1026/v2/subscriptions/
Content-Type: application/json
fiware-service: openiot
fiware-servicepath: /
{
"description": "Notify QuantumLeap of count changes of any Motion Sensor",
"subject": {
"entities": [
{
"idPattern": "Motion.*"
}
],
"condition": {
"attrs": [
"xxValue"
]
}
},
"notification": {
"http": {
"url": "http://quantumleap:8668/v2/notify"
},
"attrs": [
"xxValue"
],
"metadata": ["dateCreated", "dateModified"]
},
"throttling": 1
} |
Hi @derteufelqwe, I guess, you have found these tutorials? https://fiware-tutorials.readthedocs.io/en/latest/iot-sensors.html If the subscription is saved in the context broker, you just need to patch an attribute, see https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/user/walkthrough_apiv2.md#update-entity |
Hi @SBlechmann |
@SBlechmann thanks so much for replying to @derteufelqwe, much appreciated! @derteufelqwe thanks for your feedback.
It is, I agree. This is an unfortunate side-effect of creating tables on the fly. The metadata table only gets created when QL receive the first notification ever. So if you try querying data before the first notification you get that error. At the moment fixing this isn't a priority for us, since it's a corner case. But you're welcome to open an issue about it, so we can track it. @SBlechmann @derteufelqwe we released version |
Describe the bug
When I try the docker-compose file from the tutorial and try to query quantumleap, I get an exception in quantumleap and no data returned.
Quantumleap reports the following error:
Logs
time=2023-12-03 12:45:28.089 | level=ERROR | corr=None | from=172.22.0.1 | srv=openiot | subserv=None | op=_get_entity_type | comp=translators.crate | msg=RelationUnknown[Relation 'md_ets_metadata' unknown] | payload=None | thread=139669828012832 | process=9
2023-12-03T12:45:28.094796692Z Traceback (most recent call last):
2023-12-03T12:45:28.094806282Z File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 1660, in _get_entity_type
2023-12-03T12:45:28.094840812Z self.cursor.execute(stmt)
2023-12-03T12:45:28.094846902Z File "/usr/local/lib/python3.8/site-packages/crate/client/cursor.py", line 53, in execute
2023-12-03T12:45:28.094850262Z self._result = self.connection.client.sql(sql, parameters,
2023-12-03T12:45:28.094853182Z File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 396, in sql
2023-12-03T12:45:28.094856342Z content = self._json_request('POST', self.path, data=data)
2023-12-03T12:45:28.094859272Z File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 523, in _json_request
2023-12-03T12:45:28.094863482Z _raise_for_status(response)
2023-12-03T12:45:28.094870502Z File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 206, in _raise_for_status
2023-12-03T12:45:28.094873741Z raise ProgrammingError(error.get('message', ''),
2023-12-03T12:45:28.094876641Z crate.client.exceptions.ProgrammingError: RelationUnknown[Relation 'md_ets_metadata' unknown]
To Reproduce
fiware/orion-ld
(or just take the docker-compose file below)my docker-compose.yaml file
Expected behavior
No error happens and the
md_ets_metadata
table existsEnvironment (please complete the following information):
The text was updated successfully, but these errors were encountered: