I was able to import the MySQL Database to MongoDB, using:
- Robbery 3T
- Pentaho Data Integration
- MySQL Workbench
I'm using Ubuntu 18.04 LTS.
3T Theft
- Download from: link
- Extract and run / robomongo / bin / robo3t
- Create a new connection to mongodb (MongoDB should already be running by default on localhost: 27017)
Pentaho Data Integration
- Download and extract: link
- This guide is essential for Pentaho to work: link
(In Install Pentaho Kettle 4.3.0 step number 3, add: cat ~ / .bashrc)
- When extracting the file, it shows a data-integration folder.
- Download jar file to connect MySQL: link
- Place the .jar file in / data-integration / lib (This helps us connect mysql to Pentaho.
- In the terminal write:
/data-integration/spoon.sh
Automatically starts the Spoon program.
Import from MySQL the .sql file
Open workbench and user
Create a new schema for the database.
Go to: File > Open Sql script > select mibasededatos.sql
Select the previously created schema and execute.
Create connection in Spoon to Mysql
-Go to the Spoon program > View
- Right click on Database connections.
-
Select
Connection type: MySQL
Access: Native (JDBC)
Connection name: my connection
Host: localhost
Database name: / Mysql's DB name /
Username and password: / Mysql credentials /
-
Select the test button to see if the Database has been connected.
- In the Design tab> Input
- Select the way you want to import the information and drag to the right panel.
- Double click on input to enter the data query you want.
- On the same tab go to Big Data > MongoDB Output and drag to the panel.
- Mapping the input to MongoDB.
- In MongoDB Output select Output options > select the MongoDB Database and Collection.
- Select Run, save the transfer and execute.
And the data is stored successfully in MongoDB.