So I have a Django DB Model as such:
class Film(models.Model):
title = ArrayField(models.CharField(default='',
max_length=600), blank=True, null=True)
likes = models.IntegerField(default=0, null=True)
dislikes = models.IntegerField(default=0, null=True)
embed_html = models.CharField(default='',
max_length=600)
views = models.IntegerField(default=0, null=True)
tags = ArrayField(models.CharField(default='',
max_length=600), blank=True, null=True)
category = ArrayField(models.CharField(default='',
max_length=600), blank=True, null=True)
I'm attempting to use pgload to populate my db with a CSV, yet I run into the error:
2016-04-24T07:00:53.311000Z ERROR Database error 22P02: malformed array literal: "Random Title Name" DETAIL: Array value must start with "{" or dimension information.
Now I understand how to insert array values with raw SQL, I'm just perplexed on how to do so using pgloader. Here's my config aswell.
LOAD CSV
FROM 'first-edit.csv'
HAVING FIELDS
(
embed_html, title, tags, category
)
INTO postgresql:///tester?test_film
TARGET COLUMNS
(
embed_html, title,tags,category
)
WITH fields terminated by ',',
drop indexes
;