chunjun
chunjun copied to clipboard
[Question] How to convert spatial type data
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 中的空间类型数据 遇到了数据类型不能转换的问题.
- 转换string,会报错java.lang.ClassCastException: org.postgresql.util.PGobject cannot be cast to java.lang.String
chunjun是怎么做 空间数据类型 的 转换呢
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
chunJun目前不支持这种类型做转换,如果你有好的想法,可以贡献给chunjun
@FlechazoW 若某库没有这种空间类型,这个要怎么存储 ?把空间数据变成字符串去存储?这样可以接受不?
用字符串的格式存储能快速转换吗?用binary 存储会不会更好呢?
不可以的, gp转不成 二进制存储 的
我们采用了 通过chunjun采集数据存储格式是text,在后置sql中写create table as select 语句处理 ...