Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dbName"></param>
        /// <param name="backfill"></param>
        /// <returns></returns>
        public virtual string Backfill(string dbName, BackfillParams backfill)
        {
            var downsamplers = backfill.Downsamplers.ToCommaSpaceSeparatedString();
            var filters      = BuildFilters(backfill.Filters);
            var timeFrom     = backfill.TimeFrom.ToString("yyyy-MM-dd HH:mm:ss");
            var timeTo       = backfill.TimeTo.ToString("yyyy-MM-dd HH:mm:ss");
            var tags         = BuildTags(backfill.Tags);
            var fillType     = BuildFillType(backfill.FillType);

            var query = String.Format(QueryStatements.Backfill,
                                      downsamplers, backfill.DsSerieName, backfill.SourceSerieName, filters, timeFrom, timeTo, backfill.Interval, tags, fillType);

            return(query);
        }
        public virtual async Task <IInfluxDataApiResponse> BackfillAsync(string dbName, BackfillParams backfillParams)
        {
            var query    = _cqQueryBuilder.Backfill(dbName, backfillParams);
            var response = await base.GetAndValidateQueryAsync(query, dbName).ConfigureAwait(false);

            return(response);
        }