-
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
WIP: Support NGSI Structured Value also for Type different from StructuredValue (if they map to that value type) #132
Conversation
to fix issue with PostalAddress orchestracities#127 and orchestracities#129 if attribute is a complex object of unknown type cast it to NGSI_STRUCTURED_VALUE, to store it as object in Crate not finish, still miss the test of complex attribute
Hello here is the pull request, waiting for your advice for the complex attribute test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems to me that current change will cast to structurevalue any not recognised attribute type
to test if an attribute value is a structured object
@agaldemas, fyi failure in the test is not related to your code, @taliaga what should we do about this painful geolocation issues? |
I should work on the PR, during this week. |
add test function in test_crate.py: test_accept_unknown_ngsi_type
test_accept_unknown_ngsi_type test_accept_special_chars
test_capitals works ok now remove lower of attribute names to have correct metadata
Rectification, I will restore the lower case for column names, it will be better for existing database, to avoid regression ;O) |
Hi guys, I've just realised that #136 overlaps with some of the work done here---namely quoting of identifiers. Merging is going to be a bit painful, but @taliaga and I will try to get it done. @agaldemas thank you so much for your contributions!!! |
You're welcome ! |
follow-up: see PR #142. |
* Update crate.py to fix issue with PostalAddress #127 and #129 if attribute is a complex object of unknown type cast it to NGSI_STRUCTURED_VALUE, to store it as object in Crate not finish, still miss the test of complex attribute * add function attrValIsStructured() to test if an attribute value is a structured object * first commit from local dev repo fix syntax error in new function attrValIsStructured * added function to detect structured value & use it in case of unknown NGSI type * quote column names to allow "-" char in name * quote of table and columns names in sql queries * change funtion attrValIsStructured name to _attr_is_structured add test function in test_crate.py: test_accept_unknown_ngsi_type * added reference to issues in new functios test_accept_unknown_ngsi_type test_accept_special_chars * fixed some code climate issues * fixed fiware-service and fiware-servicepath header ( '-' was missing) * quote table name in drop table queries * still issue with drop table add quotes * issue mkssing quote in _refresh function * fix pb in test test_capitals ? * fix pb in test test_capitals again * fixed issues with columns containing capital characters test_capitals works ok now remove lower of attribute names to have correct metadata * restore lowercase for columns names * rolling back fiware header rename, see #148 * turn comment about empty attr into test case.
to fix issue with PostalAddress #127 and #129
if attribute is a complex object of unknown type cast it to NGSI_STRUCTURED_VALUE, to store it as object in Crate
not finish, still miss the test of complex attribute, welcome hints on this and metadata handling