SimonChou12138 opened a new pull request, #5723:
URL: https://github.com/apache/seatunnel/pull/5723

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code 
changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB 
issue](https://github.com/apache/seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the 
pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix 
typo in README.md doc`.
   
   -->
   
   ### Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull 
request adds checkstyle plugin.-->
   Implement Feature https://github.com/apache/seatunnel/issues/5716
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as 
the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes 
- provide the console output, description and/or an example to show the 
behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to 
the released SeaTunnel versions or within the unreleased branches such as dev.
   If no, write 'No'.
   If you are adding/modifying connector documents, please follow our new 
specifications: https://github.com/apache/seatunnel/issues/4544.
   -->
   without
   
   ### How was this patch tested?
   
   #### Create an Oracle A table
   ```powershell
   CREATE TABLE "TEST"."SEATUNEL_ORACLE_TEST_A" ( 
        "NUMERIC_TEST" NUMBER ( 7, 2 ), 
        "XMLTYPE_TEST" "SYS"."XMLTYPE", 
        PRIMARY KEY ( "NUMERIC_TEST" ) 
   )
   ```
   #### New data
   ```powershell
   INSERT INTO "JHDCP"."SEATUNEL_ORACLE_TEST_AA" ("NUMERIC_TEST", 
"XMLTYPE_TEST") VALUES ('1', '"SYS"."XMLTYPE"(''<?xml version="1.0" 
encoding="UTF-8"?>
   <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
          http://www.apache.org/licenses/LICENSE-2.0
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
   -->
   <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
     <modelVersion>4.0.0</modelVersion>
     <parent>
       <groupId>org.apache.seatunnel</groupId>
       <artifactId>seatunnel</artifactId>
       <version>${revision}</version>
     </parent>
     <artifactId>seatunnel-translation</artifactId>
     <packaging>pom</packaging>
     <name>SeaTunnel : Translation :</name>
     <modules>
       <module>seatunnel-translation-base</module>
       <module>seatunnel-translation-flink</module>
       <module>seatunnel-translation-spark</module>
     </modules>
   </project>
   '')');
   
   ```
   #### Create an Oracle B table
   ```powershell
   CREATE TABLE "TEST"."SEATUNEL_ORACLE_TEST_B" ( 
        "NUMERIC_TEST" NUMBER ( 7, 2 ), 
        "XMLTYPE_TEST" "SYS"."XMLTYPE", 
        PRIMARY KEY ( "NUMERIC_TEST" ) 
   )
   ```
   #### Build a collection profile
   ```powershell
   env {
     execution.parallelism = 2
     job.mode = "BATCH"
     checkpoint.interval = 10000
   }
   
   source {
     Jdbc {
           url = "jdbc:oracle:thin:@localhost:1521:orcl"
           driver = "oracle.jdbc.OracleDriver"
           connection_check_timeout_sec = 100
           user = "TEST"
           password = "123456"
           query = "select * from TEST.SEATUNEL_ORACLE_TEST_A"
       }
   }
   
   sink {
     Jdbc {
           url = "jdbc:oracle:thin:@localhost:1521:orcl"
           driver = "oracle.jdbc.OracleDriver"
           user = "TEST"
           password = "123456"
           generate_sink_sql = true
           database = JHDCP
           table = "TEST.SEATUNEL_ORACLE_TEST_B"
         }
   }
   ```
   #### result
   SEATUNEL_ORACLE_TEST_B table data is synchronized successfully
   
   
   
   
   ### Check list
   
   * [x] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [x] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update change log that in connector document. For more details you can 
refer to 
[connector-v2](https://github.com/apache/seatunnel/tree/dev/docs/en/connector-v2)
     2. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it
     3. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
   * [ ] Update the 
[`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to