Add business context
Combine device events with maintenance, production, or business records in Databricks to investigate operational questions.
EMQX Databricks Integration
Prepare MQTT telemetry with EMQX, store it in Amazon S3, and bring it into Databricks for SQL analytics and machine learning.
Overview
Combine telemetry with business data to investigate operations and build datasets for analytics and AI.
Combine device events with maintenance, production, or business records in Databricks to investigate operational questions.
Filter messages and shape payloads in EMQX before writing files, so your lakehouse receives the fields your analytics need.
Use S3 as a shared storage layer. EMQX uploads device data while Databricks reads and processes files on its own schedule.
Architecture
EMQX prepares messages and writes files to Amazon S3. Databricks reads them through a Unity Catalog external location for SQL queries and further processing.
Telemetry and events
Filter · transform · upload
Your bucket and prefix
External location · SQL · AI
From signals to datasets
| Device | Temp °C | Observed |
|---|---|---|
| sensor-01 | 23.8 | 09:42:18 |
| sensor-02 | 24.1 | 09:42:21 |
| sensor-03 | 22.6 | 09:42:24 |
Capabilities
Filter MQTT messages, choose file formats, and organize S3 uploads for Databricks.
Select topics and payload fields with SQL rules. Filter out unwanted messages and transform records before the S3 sink writes them.
Write individual messages or batch records into CSV, JSON Lines, or Parquet files. Set record-count or time limits for each batch, using formats supported by your EMQX version.
Set S3 object keys with supported template variables to group files by time or upload sequence, giving Databricks a consistent path to read.
How it works
Use an EMQX deployment with S3 integration, an S3 bucket, and a Databricks on AWS workspace with Unity Catalog.
Choose a bucket and prefix. Create a Databricks storage credential and an external location for that S3 path.
Create an Amazon S3 connector with your region’s endpoint and AWS credentials, then test the connection.
Create a SQL rule, attach an S3 sink, and set the object key, file format, and upload method.
Publish a test MQTT message. Check the resulting file in S3, then read it from Databricks to confirm the data and format.
Use cases
Analyze equipment history, compare sites, and prepare data for machine learning in Databricks.
Compare temperature, vibration, and status history with maintenance records to spot changes in equipment behavior.
Explore industrial IoTCombine telemetry with production, energy, and location data to compare performance across sites, assets, and time periods.
Build historical telemetry datasets for feature engineering, model training, and evaluation in Databricks.
Resources
EMQX documentation
Set up the S3 workflow and verify delivery from MQTT publishing to a Databricks query.
EMQX documentation
Configure S3 uploads, object keys, batching, and file formats for your telemetry.
EMQX community
Follow the EMQX team’s updates on the native Zerobus connector targeted at EMQX 7.0.
FAQ
The workflow shown here uses Amazon S3. EMQX prepares MQTT messages and writes files through its S3 sink. Databricks reads those files through a Unity Catalog external location.
Direct uploads store the content you configure. Aggregated uploads support CSV, JSON Lines, and Parquet, depending on your EMQX version. Choose a format your Databricks workflow can read and test it with representative messages.
Freshness depends on upload batching, S3 delivery, and when Databricks reads or processes the files. For aggregated uploads, tune the record-count and time limits to balance file size and data freshness.
EMQX needs permission to write to the selected S3 bucket and prefix. Databricks needs an IAM-backed storage credential, an external location, and the Unity Catalog privileges required to read those files.
Yes. EMQX SQL rules can match topics, select payload fields, and filter or transform messages before the S3 sink writes the files Databricks reads.
Plan your MQTT ingestion, S3 storage, and Databricks workflows with an EMQX expert.