-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
psgql同步到doris由于数据类型为geometry导致错误 #333
Comments
可以提供一下PG的create table ddl不? |
CREATE TABLE test_geometries (
id SERIAL PRIMARY KEY,
description TEXT NOT NULL,
geom geometry(Point, 4326) NOT NULL
);
-- 插入北京天安门位置的点数据
INSERT INTO test_geometries (description, geom)
VALUES ('Tiananmen Square, Beijing', ST_GeomFromText('POINT(116.3975 39.9085)', 4326));
-- 插入纽约时代广场位置的点数据
INSERT INTO test_geometries (description, geom)
VALUES ('Times Square, New York', ST_GeomFromText('POINT(-73.9857 40.7589)', 4326));
-- 插入巴黎埃菲尔铁塔位置的点数据
INSERT INTO test_geometries (description, geom)
VALUES ('Eiffel Tower, Paris', ST_GeomFromText('POINT(2.2945 48.8584)', 4326)); 请注意,在实际应用中,如果你的PostgreSQL数据库没有启用postgis扩展,你将无法使用geometry类型和相关函数(如ST_GeomFromText)。确保已经安装并启用了postgis扩展: CREATE EXTENSION IF NOT EXISTS postgis; |
CREATE TABLE "public"."camera_device2" (
"id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"code" varchar(255) COLLATE "pg_catalog"."default",
"name" varchar(255) COLLATE "pg_catalog"."default",
"geom" geometry(GEOMETRY),
CONSTRAINT "camera_device2_pkey" PRIMARY KEY ("id")
)
;
INSERT INTO "public"."camera_device2" ("id", "code", "name", "geom") VALUES ('1', '11', '测试', NULL); 异常信息:
|
已经修复了,com.alibaba.datax.plugin.rdbms.reader.CommonRdbmsReader.Task 的 buildRecord方法中支持的列类型添加 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
不小心把测试环境删了,只能文字描述了。
pg库的数据库字段为geometry,将数据同步到doris时出现异常,提示应该是不支持geometry类型。
The text was updated successfully, but these errors were encountered: