jazzband / django-redshift-backend

Redshift database backend for Django
Apache License 2.0
83 stars 47 forks source link

Is the new JsonField supported? #12

Closed dkarchmer closed 2 months ago

dkarchmer commented 8 years ago

Since like Redshift does have support for Json fields, but I am unclear if django-redshift will translate the new JsonField to that.

emyller commented 7 years ago

@dkarchmer Unfortunately, Redshift doesn't support the JSON data type. It does provide a few functions to ease accessing data from JSON strings, but it doesn't leverage PostgreSQL's underlying capabilities.

From the Redshift documentation page linked above:

We recommend using JSON sparingly. JSON is not a good choice for storing larger datasets because, by storing disparate data in a single column, JSON does not leverage Amazon Redshift’s column store architecture.

However, I do store JSON on Redshift. In order to make the usage smoother with Django, I'm using @dmkoch's django-jsonfield to define model fields. Keep in mind though that the underlying varchar column is limited to 64KB-1 size, so one might want to store large JSON data somewhere else (e.g S3).