Extend ILP to allow to set non-designated timestamp column to current server timestamp
#2.139 geöffnet am 19.05.2022
Repository-Metriken
- Stars
- (13.403 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 5T 13h) (108 gemergte PRs in 30 T)
Beschreibung
Is your feature request related to a problem?
Sometime it's useful to see the difference between the event timestamp and the timestamp it is got written in QuestDB. To do that a column with server timestamp auto generated by QuestDB is needed.
Describe the solution you'd like.
Add feature to ILP parser to write server timestamp to a column
table,ticker=BTC price=123.42,server_timestamp=now() 1652971930000000000
I suggest using syntax now() because it's relatively short and descriptive
This should create table
| column | type | value |
|---|---|---|
| ticker | Symbol | BTC |
| price | Double | 123.42 |
| server_timestamp | Timestamp | 2022-05-19T14:52:12 |
| timestamp | Timestamp | 2022-05-19T14:52:10 |
Describe alternatives you've considered.
Alternative would be to add default value in table create statement. Defaults are useful on their own and deserve their own issue.
Adding syntax to ILP will still be useful since many users do not pre-create tables before sending ILP data
Additional context.
No response