Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8470

Support for TSVECTOR data types for postgres source connector

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • Backlog
    • None
    • jdbc-connector
    • None
    • False
    • None
    • False

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      2.7.0.Final

      What is the connector configuration?

      {
      "name": "vms__staffing_request_src_connector",
      "config": {
      "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
      "database.hostname": "${file:/secrets/rds.properties:hostname}",
      "database.port": "${file:/secrets/rds.properties:port}",
      "database.user": "${file:/secrets/rds.properties:user}",
      "database.password": "${file:/secrets/rds.properties:password}",
      "database.dbname": "vms__staffing_request",
      "database.server.name": "vms__abilitystack",
      "topic.prefix": "vms__staffing_request",
      "plugin.name": "pgoutput",
      "slot.name": "vms_staffing_request_slot",
      "include.unknown.datatypes": "true",
      "schema.include.list": "debezium,master_data,staffing_request,hiring_workflow,candidate,staffing_request_per_diem,hiring_workflow_per_diem",
      "table.include.list": "master_data.role,master_data.request_category_role_xref,master_data.request_category,master_data.specialty,master_data.request_type,master_data.shift,master_data.shift_timing,master_data.staffing_request_status,staffing_request.staffing_request,staffing_request.staffing_request_supplier,staffing_request.supplier_tier,staffing_request.staffing_request_audit,hiring_workflow.candidate_staffing_request_xref,hiring_workflow.hiring_workflow_audit,hiring_workflow.offer,candidate.candidate,candidate.candidate_document,master_data.candidate_management_stage,master_data.candidate_management_sub_stage,master_data.compliance_documents_status,staffing_request.staffing_request_helper,staffing_request.staffing_request_approver,staffing_request_per_diem.reported_conversations,staffing_request_per_diem.staffing_req_per_diem_candidate_audit,staffing_request_per_diem.staffing_request_per_diem,staffing_request_per_diem.staffing_request_per_diem_audit,staffing_request_per_diem.staffing_request_per_diem_users,hiring_workflow_per_diem.candidate_per_diem_staffing_request_shift_xref,hiring_workflow_per_diem.staffing_request_per_diem_shifts,master_data.candidate_management_sub_stage_per_diem,master_data.candidate_management_stage_per_diem,candidate.candidate_client_xref",
      "time.precision.mode": "connect",
      "snapshot.mode": "initial",
      "decimal.format": "NUMERIC",
      "json.output.decimal.format": "NUMERIC",
      "decimal.handling.mode": "precise",
      "key.converter": "org.apache.kafka.connect.json.JsonConverter",
      "key.converter.schemas.enable": "true",
      "value.converter": "org.apache.kafka.connect.json.JsonConverter",
      "value.converter.schemas.enable": "true",
      "signal.data.collection": "debezium.debezium_signal",
      "heartbeat.interval.ms": "5000",
      "heartbeat.action.query": "update debezium.debezium_heartbeat set last_heartbeat_ts = now();"
      }
      }

      What is the captured database version and mode of deployment?

      (E.g. on-premises, with a specific cloud provider, etc.)

      RDS Postgres

      What behavior do you expect?

      <Your answer>

      What behavior do you see?

      "billing_with_weights"=EXCLUDED."billing_with_weights" was aborted: ERROR: column "billing_with_weights" is of type tsvector but expression is of type bytea

        Hint: You will need to rewrite or cast the expression.

        Position: 492  Call getNextException to see other errors in the batch.   [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]

      2024-11-26 15:57:00,405 ERROR  ||  ERROR: column "billing_with_weights" is of type tsvector but expression is of type bytea

        Hint: You will need to rewrite or cast the expression.

      Do you see the same behaviour using the latest released Debezium version?

      (Ideally, also verify with latest Alpha/Beta/CR version)

      Yes There is no support for the mentioned data type

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      2024-11-26 15:57:00,405 WARN   ||  SQL Error: 0, SQLState: 42804   [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]

      2024-11-26 15:57:00,405 ERROR  ||  Batch entry 0 INSERT INTO "billing"."worker_billing" ("id","created_at","updated_at","created_by_user_id","updated_by_user_id","worker_id","client_id","msp_id","supplier_id","engagement_id","billing_display_id","weekly_summary_minutes","week_ending_date","linked_worker_eng_billing_id","billing_with_weights") VALUES (cast(('0231748a-4310-4c21-87de-cec5fc12e61b') as uuid),('2024-11-08 05:59:35.244+00'::timestamp),('2024-11-08 05:59:35.431+00'::timestamp),cast(('0e39fd01-b897-4917-9909-3ed9b8923e20') as uuid),cast(('0e39fd01-b897-4917-9909-3ed9b8923e20') as uuid),cast(('5a575bfb-ce61-49b5-be45-cc5aa87e3ecd') as uuid),cast(('647fbef4-15bc-4288-a831-5a7989195677') as uuid),cast(('235d7c18-a675-40c7-9942-8437aaff7db1') as uuid),cast(('f1dd8339-6343-42e0-8d3e-f3d19f6bf175') as uuid),cast(('50495436-da98-4269-a1e5-d2a5a844b023') as uuid),('HEA-JON-0807'),cast(('{"pto": 0, "total": 3360, "oncall": 180, "customs": [

      {"label": "Unpaid orienatation", "value": "ffdd2b82-23b8-4f99-a4f0-b3c4e76d2726", "minutes": 120}

      ], "holiday": 0, "regular": 2580, "callback": 120, "week_off": 0, "over_time": 180, "nightshift": 0, "double_time": 0, "orientation": 180}') as json),('2024-11-09'::date),cast(('e1030d3e-430a-4026-8379-8da25be7959a') as uuid),?) ON CONFLICT ("id") DO UPDATE SET "created_at"=EXCLUDED."created_at","updated_at"=EXCLUDED."updated_at","created_by_user_id"=EXCLUDED."created_by_user_id","updated_by_user_id"=EXCLUDED."updated_by_user_id","worker_id"=EXCLUDED."worker_id","client_id"=EXCLUDED."client_id","msp_id"=EXCLUDED."msp_id","supplier_id"=EXCLUDED."supplier_id","engagement_id"=EXCLUDED."engagement_id","billing_display_id"=EXCLUDED."billing_display_id","weekly_summary_minutes"=EXCLUDED."weekly_summary_minutes","week_ending_date"=EXCLUDED."week_ending_date","linked_worker_eng_billing_id"=EXCLUDED."linked_worker_eng_billing_id","billing_with_weights"=EXCLUDED."billing_with_weights" was aborted: ERROR: column "billing_with_weights" is of type tsvector but expression is of type bytea

        Hint: You will need to rewrite or cast the expression.

        Position: 492  Call getNextException to see other errors in the batch.   [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]

      2024-11-26 15:57:00,405 ERROR  ||  ERROR: column "billing_with_weights" is of type tsvector but expression is of type bytea

        Hint: You will need to rewrite or cast the expression.

        Position: 492   [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]

      2024-11-26 15:57:00,416 ERROR  ||  Failed to process record: Failed to process a sink record   [io.debezium.connector.jdbc.JdbcSinkConnectorTask]

      org.apache.kafka.connect.errors.ConnectException: Failed to process a sink record

      at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:229)

      at io.debezium.connector.jdbc.JdbcChangeEventSink.lambda$flushBuffers$2(JdbcChangeEventSink.java:207)

      at java.base/java.util.HashMap.forEach(HashMap.java:1429)

      at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffers(JdbcChangeEventSink.java:207)

      at io.debezium.connector.jdbc.JdbcChangeEventSink.execute(JdbcChangeEventSink.java:159)

      at io.debezium.connector.jdbc.JdbcSinkConnectorTask.put(JdbcSinkConnectorTask.java:103)

      at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:601)

      at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:350)

      at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:250)

      at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:219)

      at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:204)

      at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:259)

      at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)

      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)

      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)

      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)

      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)

      at java.base/java.lang.Thread.run(Thread.java:1583)

      Caused by: org.hibernate.exception.SQLGrammarException: error executing work

      How to reproduce the issue using our tutorial deployment?

      <Your answer>

      Feature request or enhancement

      Support for TSVECTOR data types for postgres

      Which use case/requirement will be addressed by the proposed feature?

      tsvector type column values to be sinked from source side. Request support on both source and sink connector for postgres

      Implementation ideas (optional)

      <Your answer>

              Unassigned Unassigned
              ashwathk@abilitystack.com Ashwath Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: