SELECT INTO syntax loose data


#1

Hello,
i’m using the INTO syntax to create a second measurement, getting data from a first measurement.
However only a part of the data is copied into the second measurement, i have a lots of empty time interval.
The syntax i’m using is the following:

SELECT * INTO measureB FROM measureA WHERE host =~ /.lan./ and time > now() - 1d

Is there a known bug maybe? I did’nt see any error in the log, i’m using influxdb v 1.3.5.
Regards
Francesco


#2

Hi Francesco ,
It is recommended to add the group by * when using into queries …

Could you retry with :

SELECT * INTO measureB FROM measureA WHERE host =~ /. lan. / and time > now() - 1d group by *

Best regards


#3

Hi MarcV,
you are right, using the ‘group by *’ at the end of the query it works, and i loose no data.
Hope this will help somebody else! :slight_smile: