django-redshift-backend icon indicating copy to clipboard operation
django-redshift-backend copied to clipboard

Is the new JsonField supported?

Open dkarchmer opened this issue 8 years ago • 1 comments

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

dkarchmer avatar Oct 14 '16 00:10 dkarchmer

@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).

emyller avatar Aug 27 '17 17:08 emyller