Skip to content
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

Metafield json_string as string. #92

Open
SamProtas opened this issue Mar 31, 2021 · 0 comments
Open

Metafield json_string as string. #92

SamProtas opened this issue Mar 31, 2021 · 0 comments

Comments

@SamProtas
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant