-
Notifications
You must be signed in to change notification settings - Fork 92
Metafield json_string as string. #92
Description
I'd like to gauge the interest in accepting a PR for new functionality.
The metafield.value field currently has the following schema:
"value": {
"type": [
"null",
"integer",
"object",
"string"
],
"properties": {}
},
The object type occurs when the type field is what's called a json_string in Shopify's API. It doesn't appear the SQL targets (or at least redshift/postgres) support object in this list of possible types, and they silently drop these values. I'd like a way to keep them as strings (what Shopify returns directly) so they'll still make it to my database.
Would you be amenable to a config flag (default off for backwards compatibility) that would disable current json_string parsing logic, leaving those values as strings?
I'm going to add this for myself, and then I plan on adding a generated column to parse these into JSONB manually in the target db. I have to imagine this is a very common use case that others may be interested in. I'd also prefer not maintaining a fork.