-
Notifications
You must be signed in to change notification settings - Fork 218
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
Use jsonb datatype within postgres/timescale historian #3053
Comments
@schandrika thoughts? @ntenney this fits with our issue. |
Instead of meta_map = {tid: jsonapi.loads(meta) if meta else None for tid, meta in rows} if meta and isinstance(meta, str): |
I like checking isinstance than the alternate solution of forcing jsonb. |
This is from @ntenney that we are using in our deployment. meta_map = {tid: meta if meta and type(meta) == dict else jsonapi.loads(meta) if meta else None for tid, meta in rows} |
Is your feature request related to a problem? Please describe.
I changed my local database to use jsonb for the metadata column in the topics table. When the agent starts up for the first time everything is fine, however on subsequent starts the agent fails to start due to jsonb returning a dictionary rather than the text for the metadata.
As seen in the following stack trace.
Describe the solution you'd like
I think it would be easily handled in the current code structure by determining if the passed column is a dictionary or not before attempting to load it.
Describe alternatives you've considered
Remove all of the text and go with jsonb for all
The text was updated successfully, but these errors were encountered: