-
Notifications
You must be signed in to change notification settings - Fork 43
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
TROE example #1397
Comments
Hi,
There's a bunch more options you might want to use:
Try the "extended usage" (-U) to see the names of the corresponding env vars (and more things, like default values). Good luck! |
This tutorial should help: |
Hi kzangeli, thanks a lot for your quick response.
I also checked the tutorial that you have linked. Thanks. But It seems to be more about querying and not about how to configure everything. I think my definite question is: If I have a mongodb entity with an attr that I regurarily PATCH, and I want to use Troe for this entity. What do I have to do besides enabling troe in orion? Thanks a lot :-) |
Ok, then something seems to go wrong somewhere. Do the traces give any hint? |
Hi Kzangeli, hereby the log. I executed three PATCH requests.
The PATCH requests look like this: Database dumb:
|
No errors in the logs, that's good, I guess. Let's up the traces, add these two options: |
Nope, no tenants. I added the trace option. Hereby a copy of the output:
Very interesting that it does construct a INSERT query. But it doesnt seem to execute it? |
And, for clarity, "-troe" is all you need for the broker to persist to the historical database. |
So, we even see that it "tries" to persist. What about tenants? |
I didnt do anything out of the ordinary. I just created my three entities and thats it. Btw! I created the entities before I enabled TROE. Maybe thats it? |
Ok, I just remembered I had problems with the postgres driver to give back errors. Check the logfile.of the postgres server /var/log/postgres/something, I assume ... |
The patch would add to postgres regardless of when the entity was created . |
Ok. I also confirmed that adding entities doesnt add it. It constructs again two queries but no change in db:
|
Btw. Executing the query directly in psql gives me this:
I will reseed |
Ok! |
Hi, it works now. I used the One observation. If you create an entity BEFORE temporarl storage is enabled, the entities table isnt being populated. Only attributes. So i deleted all entities and recreated them and now its all good
Thanks a lot for your help |
ok! And yes, the broker only adds historical stuff for every update/create/delete. Thanks for reporting! |
Hi, see the documentation on db-migration: https://github.com/FIWARE/context.Orion-LD/blob/develop/doc/manuals-ld/troe.md#database-migration |
Hi,
I was wondering if there is any example available on how to work with the TROE implementation. I got Orion-LD to start with a connection to postgres. I created entities in mongodb and i PATCH their attributes via Postman. But how do I activate the temporal sink for those PATCH updates? So that every time I patch one the attr
numValue
, the change is being stored in TimescaleDB so that I can query it with the temporal interface.Thanks a lot.
Creation of Measurement entity:
measurement PATCH (update of numValue)
orion Startup:
The text was updated successfully, but these errors were encountered: