Skip to content
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

[BUG][Jdbc][Oracle]ErrorCode:[COMMON-06], ErrorDescription:[Illegal argument] - The current field is DecimalType containing decimals: 18 Unable to support #6768

Open
3 tasks done
EternalZhouYu opened this issue Apr 28, 2024 · 1 comment
Labels

Comments

@EternalZhouYu
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

The Source is JDBC connecting to an Oracle database, and the Sink is Doris. In the configuration file, "partition_column = 'xxx'" is specified. When starting the data extraction task, if the "xxx" field is of type Int, the error mentioned in the title occurs. However, if "xxx" is changed to BigInt type, the extraction is successful.

SeaTunnel Version

2.3.4

SeaTunnel Config

env {
        parallelism = 4
        job.mode = "BATCH"
}

source {
        Jdbc {
                url = "jdbc:oracle:thin:@xxx:xxx/xxx"
                driver = "oracle.jdbc.OracleDriver"
                user = "xxx"
                password = "xxx"
                query = "select * from XXX" 
		partition_column = "xxx"
		partition_num = 3
		properties {
        		database.oracle.jdbc.timezoneAsRegion = "false"
       		 }
		}
}

sink {
  Doris {
    fenodes = "xxx:8030"
    username = xxx
    password = "xxx"
    database = "xxx"
    table = "xxx"
    doris.config {
     format = "json"
     read_json_by_line = "true"
    }
  }
}

Running Command

./bin/seatunnel.sh --config ./config/xxx.config

Error Exception

2024-04-28 14:05:13,875 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:199)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: org.apache.seatunnel.connectors.seatunnel.jdbc.exception.JdbcConnectorException: ErrorCode:[COMMON-06], ErrorDescription:[Illegal argument] - The current field is DecimalType containing decimals: 18 Unable to support
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.FixedChunkSplitter.createSplits(FixedChunkSplitter.java:66)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.ChunkSplitter.generateSplits(ChunkSplitter.java:101)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceSplitEnumerator.run(JdbcSourceSplitEnumerator.java:81)
	at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.stateProcess(SourceSplitEnumeratorTask.java:307)
	at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.call(SourceSplitEnumeratorTask.java:134)
	at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:643)
	at org.apache.seatunnel.engine.server.TaskExecutionService$NamedTaskWrapper.run(TaskExecutionService.java:944)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:191)
	... 2 more
 
2024-04-28 14:05:13,875 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - 
===============================================================================



Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:199)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: org.apache.seatunnel.connectors.seatunnel.jdbc.exception.JdbcConnectorException: ErrorCode:[COMMON-06], ErrorDescription:[Illegal argument] - The current field is DecimalType containing decimals: 18 Unable to support
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.FixedChunkSplitter.createSplits(FixedChunkSplitter.java:66)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.ChunkSplitter.generateSplits(ChunkSplitter.java:101)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceSplitEnumerator.run(JdbcSourceSplitEnumerator.java:81)
	at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.stateProcess(SourceSplitEnumeratorTask.java:307)
	at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.call(SourceSplitEnumeratorTask.java:134)
	at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:643)
	at org.apache.seatunnel.engine.server.TaskExecutionService$NamedTaskWrapper.run(TaskExecutionService.java:944)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:191)
	... 2 more
2024-04-28 14:05:13,877 INFO  [s.c.s.s.c.ClientExecuteCommand] [ForkJoinPool.commonPool-worker-2] - run shutdown hook because get close signal

Zeta or Flink or Spark Version

Zeta
hazelcast : version 5.1
disruptor : version 3.4.4

Java or Scala Version

1.8.0_333

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Jetiaime
Copy link
Contributor

Jetiaime commented Apr 29, 2024

Can you give more details about Oracle Cloumn Type ? If you use like Integer, in oracle it will turn to NUMBER(38), in old version SeaTunnel, it will be turn into Decimal(38, 18) for some reson (now has been deprecated). And partition_column Cannot be decimal (at least cannot have scale), So you should upgrade SeaTunnel or just using BigInt instead.

you can check the Oracle type convert in: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Data-Types.html#GUID-0BC16006-32F1-42B1-B45E-F27A494963FF

And check code: org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.oracle.OracleDataTypeConvertor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants