Milliseconds from timestamp column is trimmed during processing, when it's used as a tracking column. As a result, when tracking_column has timestamp type and value has milliseconds precision, rows are re-processed.
For example, when tracking has value 2024-09-15 16:45:16.222464
And executed sql is:
select 'Datapoint value for ' || log_type || ' is ' || datapoint as datapoint, log_type, created_at
from logs_data
where created_at > $$1 order by created_at
2024-09-15 16:45:16 is taken as a parameter (without .222464). As a result, the same rows are reprocessed.
Expected Result
For my setup, I'd expect 4 log entries generated in total
Actual Result
Log signals are generated every 10 seconds, for the same records, ex:
Component(s)
internal/sqlquery, receiver/sqlquery
What happened?
Description
Milliseconds from timestamp column is trimmed during processing, when it's used as a tracking column. As a result, when
tracking_column
has timestamp type and value has milliseconds precision, rows are re-processed.Steps to Reproduce
Here is setup: https://github.com/Grandys/otel-collector-sqlqueryreceiver-setup, branch
reporocess-ts-column
Verify collector output or check local LGTM (http://localhost:3000 admin/admin).
For example, when tracking has value
2024-09-15 16:45:16.222464
And executed sql is:2024-09-15 16:45:16
is taken as a parameter (without.222464
). As a result, the same rows are reprocessed.Expected Result
For my setup, I'd expect 4 log entries generated in total
Actual Result
Log signals are generated every 10 seconds, for the same records, ex:
Collector version
v0.109.0
Environment information
Environment
OS: macOS Monterey Compiler: go1.22.6 darwin/amd64
OpenTelemetry Collector configuration
Log output
No response
Additional context
Table definition: