KETTLE:MONGDB and MySQL data transfer

Source: Internet
Author: User

Note: Part of the content refers to HTTP://BLOG.SINA.COM.CN/S/BLOG_4AC9F56E0101G881.HTML1, MongoDB data to MYSQL1) in kettle, MongoDB input component.
2) Edit component input Connection information
Select Database
Write query statements
Select a field. The check box above selects whether to enter the JSON format, which is not selected. Click Get Fileds to get the field correspondence. $ represents the root directory. Representing subdirectories[] represents the values in the array, for example:
  1. {"data" :{
  2. "museum":[
  3. {
  4. "country":"italy",
  5. "city": "Vencie",
  6. "id_museum":"109",
  7. "name":"pa"},
  8. {
  9. "country":"Mexico",
  10. "city": "Mexico city",
  11. "id_museum":"36",
  12. "name":"Musre"}
  13. ]
  14. }
  15. }
  16. $..city表明元素city是在根节点下data节点内的museum节点内。
  17. $[1].city表明指定的元素,即上述museum数组第二个节点的city值
previewing data

3) Table Output Select the output-table output component. Connect the MongoDB input component and the table output component.
Edit Table Output

4) Perform the conversion

Ii. MySQL Data migration to MONGODB1) Select the table input component and edit the table input

2) Select the "Bigdata-mongodb ouput" component to connect the two components. Edit the MongoDB output component

Enter connection information
Input data data and collections (no collection is created automatically)
Click Get field
3) Perform the conversion

From for notes (Wiz)

KETTLE:MONGDB and MySQL data transfer

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: 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.