Combining Multiple Data Sources
Use these when you have data from two separate queries and want to bring them together.
Join — DF_JOIN
Match rows from two datasets by a shared key column, similar to looking up a value in a reference table.
Use this when: you have two related tables — for example, sensor readings in one and device details (name, location, type) in another — and you want to combine them into one.
| Join type | Keeps rows from… |
|---|---|
inner | Only rows that match in both datasets |
left | All rows from the first dataset; fills gaps with empty if no match |
outer | All rows from both datasets |
First dataset (sensor readings)
Code
Second dataset (device details)
Code
After — inner join on device_id
Code
Code
Merge — DF_MERGE
Combine columns from two datasets that share the same index column, adding new columns side-by-side.
Use this when: both datasets have the same rows (aligned on a shared key, like timestamp) and you want to add new columns from the second one — rather than matching and filtering rows like Join does.
First dataset
Code
Second dataset
Code
After — merged on timestamp
Code
Code
Concatenate — DF_CONCATENATE
Stack rows from multiple datasets on top of each other.
Use this when: you have the same kind of data from different sources or time periods, and you want to treat them as one combined dataset — for example, January readings and February readings.
First dataset (January)
Code
Second dataset (February)
Code
After — stacked together
Code
Code
Set "addQueryIdField": true to add a column tracking which dataset each row came from.