Use the Kettle tool to insert the contents of a text file into a MySQL table under a Linux virtual machine

Source: Internet
Author: User
Tags unpack

First, unpack the kettle package

1. Copy the package to the Linux system

And the MySQL driver pack.

2, unpack the zip suffix package

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

You can delete the original package.

Input command:rm-f pdi-ce-7.0.0.0-25.zip

Ii. Creating databases and tables

Inserting data from a text file into a database table

1, write good text file

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

3. Edit the text file by right-clicking the edit step

Click Preview to select your text file

Click Add, your text file will be added to the selected file

Edit Content

Click Get field

Then make sure it's done, so we can edit our text file.

4. Right-click Table Output, select Edit Step

Edit a database connection

Host name write the IP address of your Linux virtual machine

Click Test to see if the connection is successful

If the connection is unsuccessful, check if your MySQL package has been directed to the virtual machine,

Host name is not written wrong

Linux virtual machine MySQL service has no boot

Is the firewall of the Linux virtual machine turned off?

5. Click the Run button

6. See if the tables in the virtual machine have been added into the data

There's a data, and that means OK.

Iv. attention

The field names in the text file must match the field names in the table

Use the Kettle tool to insert the contents of a text file into a MySQL table under a Linux virtual machine

Related Article

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.