Use kettle to insert the text file content into the mysql table under the Linux Virtual Machine. kettlemysql

Source: Internet
Author: User

Use kettle to insert the text file content into the mysql table under the Linux Virtual Machine. kettlemysql

I. decompress the kettle package

1. Copy the package to Linux.

 

 

Mysql driver package

 

 

2. decompress the zip package

Enter the command: unzip/software/pdi-ce-7.0.0.0-25.zip

 

 

You can delete the original package.

Enter the command: rm-f pdi-ce-7.0.0.0-25.zip

 

2. Create databases and tables

 

 

3. insert data in text files into database tables

1. Write a text file

 

 

2. Drag a text file input and a table output in kettle

 

3. Right-click and select Edit to edit a text file.

Click Preview to select your text file

 

 

Click Add to add your text file to the selected file.

 

 

Edit content

 

Click to obtain Fields

 

 

Then confirm the completion, so that we can edit our text file.

 

4. Right-click the table output and select Edit steps.

Edit database connection

 

 

Host Name: Enter the IP address of your Linux Virtual Machine

 

 

Click test to check whether the connection is successful.

 

 

If the connection fails, check whether your mysql package has been exported to the virtual machine,

Is there an error in the Host Name?

Does the mysql service of Linux Virtual Machine start?

Does the firewall of Linux virtual machine turn off?

5. Click "run ".

 

 

6. Check whether the table in the virtual machine has been added to the data.

 

If there is data, it means OK.

4. Note

The field names in the text file must be the same as those in the table.

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.