Closed rfhb closed 3 years ago
thanks, I'll have a look.
(p.s. after this PR is merged, are you interested in having commit access to the repo? I can add you and you can still do contributions through PR's, but also direct commits - up to you - you can be trusted at this point 😸 )
Many thanks @sckott for suggestion, am honoured! Happy to help with nodbi.
As regards this PR, I've been considering my aim to handle nested fields and am not fully satisfied with my solution so far. Thus am closing the PR so that I can come back with more simple and complete proposal. Sorry if this caused any work on your side.
No worries, sounds good.
Invitation to the repo sent.
The purpose is to extend and essentially complete handling json data with the RSQLite backend.
Description
So far docdb_query.src_sqlite would not return values from all records those fields that are arrays, but only selected records such as field[1].subfield. This was because
json_extract()
was used which requires a full json path (https://www.sqlite.org/json1.html#jex). Handling this situation was not included in my initial implementation of nodbi functions for the RSQLite backend. The PR intends to cover this important use case.Example
The
contacts
are a json string that is part of the nodbi package and itsfriends
field has subitems with keysname
andid
. With this PR,friends
in the returned data.frame is column that is a list with one data.frame per row (or list item).