Kettle "Check whether the table exists"

Source: Internet
Author: User
Want to use kettle to achieve a very simple requirement, from MySQL to Oracle import a table data, if the table in Oracle does not exist, first table and then import data. This is a seemingly simple feature, but it may be a bit confusing for users who have just started to touch kettle. There is a "check table exists" step in kettle conversions and assignments, but if you want to achieve the above requirements, you can only use the job, not the conversion.
In kettle, the job is serially executed, and the next job item starts only if the previous job item succeeds. Multiple steps in a transformation are executed in parallel, and the data flow operates concurrently in all the steps that make up the transformation. Therefore, if you use transformations, you cannot guarantee the order in which the tables are to be built before the data is imported. Here is the experimental procedure.

1. Create a job called "MySQL to Oracle", as shown in the following illustration.


2. The "Check table exists" Job item is shown in the following figure.

3. The "CREATE TABLE" SQL Script job item is shown in the following figure.

4. The "MySQL to Oracle" conversion is shown in the following three images.


Reference:http://www.it4biz.com.br/cursos/kettle-cookbook/Samples/html/jobs/Slowly%20Changing%20Dimension/ Create%20-%20populate%20-%20update%20slowly%20changing%20dimension.kjb.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.