I'm using the world borders common dataset from CartoDB, which I've then exported so I can grab the_geom column, which CartoDB gives me as a hex value. I'm taking this CSV and uploading it another database so I can have that hex value. But when I try to reimport that data with the hex data, either the file fails to upload or CartoDB is not able to interrupt the hex value. Any ideas why this would be happening?
It seems that some rows have an invalid WKB geometry in "invalid_the_geom" after exported. To sort out this, you could run an ugly trick like:
update country_extract_test set the_geom = invalid_the_geom where invalid_the_geom like '0106%'
which is avoiding those invalid_the_geoms that are null or start by "FF...". Unfortunately, I haven't been able to replicate an export with the corrupted geometries.