influxdata / influxdata/kapacitor
Join returns empty
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
I'm trying to make a join between two batches but it's not working and I can't figure why
`var meanw = batch │
|query(''' SELECT mean as value FROM "metrics"."default"."mean_week_1h" ''') │
.period(2d) │
.every(10s) `
will return this result:
`time mean
---- ----
2019-02-11T01:00:00Z 1987.604285714286
`
`var current_val = batch │
|query(''' SELECT FIRST("value") as value FROM "metrics"."default"."perf_spikes_paradise_daily_perf" where "network" =│
'adstract' AND "measure" = 'revenue' ORDER BY "time" DESC LIMIT 1''') │
.period(1d) │
.every(10s) │
.groupBy(time(1d, 1h)) │
│
current_val │
|join(meanw) │
.as('current_val', 'meanw') │
.tolerance(1w) │
|influxDBOut() │
.database('metrics') │
.measurement('joined_measurement') `
current_val result is:
`time value
---- -----
2019-02-12T01:00:00Z 2019.26
`
now I see the time is different so I added a tolerance to the join but still the joined measurement is not written in influx. I assume because of empty result of the join.
Can anyone help me please?
Contributor guide
Research direction
Start by reproducing the shown TICKscript, focusing on the query, join, tolerance, and influxDBOut stages and the differing timestamps. Confirm the join's timestamp behavior and grouping, then verify that a successful join writes joined_measurement to InfluxDB.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100