column.truncate.to.length.chars does not support length zero

73 views
Skip to first unread message

Prasad

unread,
Oct 20, 2023, 6:45:00 AM10/20/23
to debezium
Hi,

The documentation of the oracle connector property -column.truncate.to.length.chars
states - 
''Set length to 0 (zero) to replace data in the specified columns with an empty string.'

It works with all the numbers > 0 but when using length as zero to empty the string

i.e. when using column.truncate.to.0.chars throws error. I even tried - 
 column.truncate.to.zero.chars where it does not truncate any char from the input string. 
So wondering if emptying a column data is supported. 
 "java.lang.IllegalArgumentException: Maximum length must be positive\n\tat io.debezium.relational.mapping.TruncateStrings.<init>(TruncateStrings.java:31)\n\tat io.debezium.relational.mapping.ColumnMappers$Builder.truncateStrings(ColumnMappers.java:178)\n\tat io.debezium.config.Configuration.lambda$forEachMatchingFieldName$29(Configuration.java:2181)\n\tat java.base/java.util.HashMap.forEach(HashMap.java:1337)\n\tat io.debezium.config.Configuration.forEachMatchingFieldName(Configuration.java:2175)\n\tat io.debezium.config.Configuration.forEachMatchingFieldNameWithInteger(Configuration.java:2059)\n\tat io.debezium.config.Configuration.forEachMatchingFieldNameWithInteger(Configuration.java:2023)\n\tat io.debezium.relational.mapping.ColumnMappers.create(ColumnMappers.java:56)\n\tat io.debezium.relational.RelationalDatabaseSchema.<init>(RelationalDatabaseSchema.java:50)\n\tat io.debezium.relational.HistorizedRelationalDatabaseSchema.<init>(HistorizedRelationalDatabaseSchema.java:47)\n\tat io.debezium.connector.oracle.OracleDatabaseSchema.<init>(OracleDatabaseSchema.java:51)\n\tat io.debezium.connector.oracle.OracleConnectorTask.start(OracleConnectorTask.java:74)\n\tat io.debezium.connector.common.BaseSourceTask.startIfNeededAndPossible(BaseSourceTask.java:260)\n\tat io.debezium.connector.common.BaseSourceTask.poll(BaseSourceTask.java:169)\n\tat org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.poll(AbstractWorkerSourceTask.java:457)\n\tat org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.execute(AbstractWorkerSourceTask.java:351)\n\tat org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:202)\n\tat org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:257)\n\tat org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.run(AbstractWorkerSourceTask.java:75)\n\tat org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:177)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\n" 

Is there any other property that we can use to empty out data for a column? 

Appreciate your help. 

Thanks,
-Prasad 

jiri.p...@gmail.com

unread,
Oct 20, 2023, 7:26:51 AM10/20/23
to debezium
Interesting, according to code it was always the same behaviour. Could you please create a Jira for it?

Thanks

J.

Prasad

unread,
Oct 26, 2023, 4:03:45 AM10/26/23
to debezium
Thanks J.


Can I know tentative ETA for the solution to be ready? 

Thanks,
-Prasad 

Reply all
Reply to author
Forward
0 new messages