Skip to content

Retrieve JSON column value #253

Answered by jraymakers
jbuiquan asked this question in Q&A
Discussion options

You must be logged in to vote

You could extend any of the converters, including the JsonDuckDBValueConverter, to do this. You'd just change the function for VARCHAR, because JSON columns use VARCHAR under the covers. That function receives the column type, and you can distinguish JSON columns from other VARCHARs by looking at the alias property of the type.

Using a STRUCT or MAP type could also be a good solution, if you can control how the data is structured. Storing data as one of those types likely to be significantly more efficient than using the JSON type.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jraymakers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants