Downsampling batch-imported-data automatically

Can influxdb downsamples batch imported past-data with a continuous query automatically?

I have started to handle data from 10,000 sensor and 100,000 network devices for Machine Learning based anomaly-detection.

I want to process data like following;

  1. Create CQ, which aggregate minute interval data to hourly interval or daily interval.
  2. Import daily or weekly data from csv to influxdb with golang client.
  3. Downsample data by some trigger.

I want to downsample from data like this,

select count from data where time >= ‘2016-12-31T15:00:00Z’ and time <= ‘2016-12-31T16:59:59Z’
name: data
time count


2016-12-31T15:00:00Z 100
2016-12-31T15:01:00Z 100
2016-12-31T15:02:00Z 100
2016-12-31T15:03:00Z 100
:
:
:
2016-12-31T15:57:00Z 100
2016-12-31T15:58:00Z 100
2016-12-31T15:59:00Z 100
2016-12-31T16:00:00Z 200
2016-12-31T16:01:00Z 200
2016-12-31T16:02:00Z 200
2016-12-31T16:03:00Z 200
:
:
:
2016-12-31T16:57:00Z 200
2016-12-31T16:58:00Z 200
2016-12-31T16:59:00Z 200

to data like following;

select count from data where time >= ‘2016-12-31T15:00:00Z’ and time <= ‘2016-12-31T16:59:59Z’
name: data
time count


2016-12-31T15:00:00Z 6000
2016-12-31T16:00:00Z 12000

And, a continuous query that I have created is following:

name: cq_test
name query


sum_count_10m_cq CREATE CONTINUOUS QUERY sum_count_10m_cq3 ON cq_test RESAMPLE FOR 10m BEGIN SELECT sum(count) INTO cq_test.autogen.sum_count_10m_cq3 FROM cq_test.autogen.data GROUP BY time(10m) END

Is it possible for bulk-import to trigger/execute continuous queries or I have to aggregate it manually?

//Regards
Taisuke Sasaya