INSERT INTO ensembl_karyotypes (
    assembly_id,
    karyotype
) (
select
    assembly_id,
    karyotype
from load_karyotypes
) ON CONFLICT (assembly_id) DO UPDATE
SET
    karyotype = excluded.karyotype
;

INSERT INTO ensembl_karyotypes (
    assembly_id,
    karyotype
) (
select
    assembly_id,
    karyotype::json
from load_karyotypes
) ON CONFLICT (assembly_id) DO UPDATE
SET
    karyotype = excluded.karyotype
;

Convert karyotype data to JSON
Convert karyotype data to JSON

It is a json field so should be loaded as such.
