chunjun icon indicating copy to clipboard operation
chunjun copied to clipboard

[Question] How to convert spatial type data

Open z1043794098 opened this issue 3 years ago • 3 comments
trafficstars

Search before asking

  • [X] I had searched in the issues and found no similar question.

  • [X] I had googled my question but i didn't get any help.

  • [X] I had read the documentation: ChunJun doc but it didn't help me.

Description

我遇到一个使用纯钧获取 postgresql 中的空间类型数据 遇到了数据类型不能转换的问题.

  1. 转换string,会报错java.lang.ClassCastException: org.postgresql.util.PGobject cannot be cast to java.lang.String

chunjun是怎么做 空间数据类型 的 转换呢

Code of Conduct

z1043794098 avatar Sep 06 '22 08:09 z1043794098

chunJun目前不支持这种类型做转换,如果你有好的想法,可以贡献给chunjun

ll076110 avatar Sep 07 '22 02:09 ll076110

@FlechazoW 若某库没有这种空间类型,这个要怎么存储 ?把空间数据变成字符串去存储?这样可以接受不?

momisabuilder avatar Sep 13 '22 08:09 momisabuilder

用字符串的格式存储能快速转换吗?用binary 存储会不会更好呢?

FlechazoW avatar Sep 13 '22 09:09 FlechazoW

不可以的, gp转不成 二进制存储 的

z1043794098 avatar Sep 27 '22 01:09 z1043794098

我们采用了 通过chunjun采集数据存储格式是text,在后置sql中写create table as select 语句处理 ...

z1043794098 avatar Sep 27 '22 01:09 z1043794098