MQTT Broker is a perfect middleware and fastest broker to be used for collecting data from your IoT edge devices and store and analyse it the way you needed. Tableau is a cool BI tool that will help you analyse the data in all dimensions. MQTT Broker Tableau integration will help you store all your data in the format you needed into the Tableau for a perfect data analysis. This blog helps you visualize data of MQTT Broker with Tableau by connecting it to MySQL or MongoDB.
Integrating MQTT Broker with MySQL :
For integrating MQTT Broker with MySQL, some dependencies should be installed. To achieve this, follow the below step.
All the dependencies required for the integration process will be downloaded.
Changes to be done in MQTT Broker:
To Verify the DB is Created or not in MySQL:
Tableau will use MySQL ODBC connector driver to talk to the MySQL. You might already have the required driver installed on your computer. If the driver is not available in your computer, Tableau displays a message in the connection dialog box with a link to the Driver Download page where you can find driver links and installation instructions. Click the “Data Source” drop down box and Select “MySQL”. Next choose OS & Bit Version and Install the driver.
Make the connection and set up the Tableau:
1. Start Tableau and under Connect, select MySQL. Then do the following:
2. On the data source page, do the following:
Configuring MQTT Broker:
To Verify the DB is Created or not in MongoDB:
Tableau use MongoDB Bi connector driver to talk to the MongoDB. You might already have the required driver installed on your computer. If the driver is not installed on your computer, Tableau displays a message in the connection dialog box with a link to the Driver Download page where you can find driver links and installation instructions. Click the “Data Source” drop down box and Select “MongoDB Bi Connector”. Next choose OS & Bit Version and Download the driver.
Creating Authentication for Mongo DB:
Login to the MongoDB shell by the command “mongo –port 27017“
Next use the “bevywise” database by the command ” use bevywise
Type the below query to create a username and password for the DB
db.createUser( { user: “<Username>”, pwd: “<Password>”, roles: [ { role: “userAdminAnyDatabase”, db: “bevywise” } ] } )
Re-start and login to the MongoDB by the command
mongo –port 27017 -u “myUserAdmin” -p “abc123” –authenticationDatabase “bevywise”
For more reference refer the Enable Auth link
Make the connection and set up the Tableau:
1.Start Tableau and under Connect, select MongoDB BI Connector. For a complete list of data connections, select More under To a Server. Then do the following:
2. On the data source page, do the following:
Try our MQTT Broker now for FREE.
Feel free to contact support for any questions or help.