[Bug] [Module Name] Bug titleWhen synchronizing data with PostgreSQL CDC, if the field type is varchar (2) and the value is null, the insertion statement becomes' NULL:: character varying ' #6722
[X] I had searched in the issues and found no similar issues.
What happened
When synchronizing data with PostgreSQL CDC, if the field type is varchar (2) and the value is null, the insertion statement becomes' NULL:: character varying '
SeaTunnel Version
2.3.4
SeaTunnel Config
env {
# You can set engine configuration here
execution.parallelism = 1
job.mode = "STREAMING"
checkpoint.interval = 5000
read_limit.bytes_per_second=7000000
read_limit.rows_per_second=400
}
source {
Postgres-CDC {
base-url = "jdbc:postgresql://xxxx:5432/tenant_xj"
username = "xxxx"
password = "xxxx"
database-names = "tenant_xj"
schema-names = "public"
table-names = "tenant_xj.public.fbr_ent_info_e"
startup.mode = initial
}
}
sink {
jdbc {
# if you would use json or jsonb type insert please add jdbc url stringtype=unspecified option
url = "jdbc:postgresql://xxxx:5432/seatunnel_test"
driver = "org.postgresql.Driver"
user = "xxxx"
password = "xxxx"
generate_sink_sql = true
# You need to configure both database and table
database = "seatunnel_test"
table = "public.fbr_ent_info_e_sync"
primary_keys = ["sunway_id"]
}
}
Running Command
./bin/seatunnel.sh --config ./config/pgsql_test_02.config -e local
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
Search before asking
What happened
When synchronizing data with PostgreSQL CDC, if the field type is varchar (2) and the value is null, the insertion statement becomes' NULL:: character varying '
SeaTunnel Version
2.3.4
SeaTunnel Config
Running Command
Error Exception
Zeta or Flink or Spark Version
No response
Java or Scala Version
No response
Screenshots
No response
Are you willing to submit PR?
Code of Conduct