diff --git a/crate.go b/crate.go index 0c1dea0..dcf5b2d 100644 --- a/crate.go +++ b/crate.go @@ -164,10 +164,11 @@ func (c crateEndpoint) write(ctx context.Context, r *crateWriteRequest) error { batch := &pgx.Batch{} for _, a := range r.rows { batch.Queue( - crateWriteStatement, + "write_statement", a.labels, a.labelsHash, - a.timestamp, + // TODO: Find non-string way of encoding timestamps. + a.timestamp.Format("2006-01-02 15:04:05.000-07"), a.value, a.valueRaw, )