Left connection to DB tributary

I am new to DB Flush. Now I need to translate MySQL db to infuxDB. I chose a DBMS inflow because it supports SQL as queries. But I could not find the left in him. I have a series called statistics that contains browser_id and another series contains a list of browsers. How can I join these two tables, such as the concept of a relational database? I wrote this query, but it does not give any result.

select * from statistics as s inner join browsers as b where s.browser_type_id = b.id 

statistics

enter image description here

browsers

enter image description here

+6
source share
2 answers

You cannot join a series in InfluxDB using arbitrary columns. InfluxDB only supports connection time series based on a time column. This is a special type of connection, unlike what you are used to in relational databases. Connection time in InfluxDB tries to match points from different time series that occurred at about the same time. You can read more about associations in InfluxDB in the documents .

+5
source

It seems now possible. Check the documentation again: https://docs.influxdata.com/influxdb/v0.8/api/query_language/#joining-series

 select hosta.value + hostb.value from cpu_load as hosta inner join cpu_load as hostb where hosta.host = 'hosta.influxdb.orb' and hostb.host = 'hostb.influxdb.org'; 
0
source

Source: https://habr.com/ru/post/976761/


All Articles