Title
#users-market-data
s

Shriram Sunder

09/04/2022, 7:57 PM
Just a quick question, how do you manage to insert multiple timestamps into QuestDB via the Golang ILP API ? For example, this does not work. The error is because there is no method for me to insert a "timeseries" column, the column types available are just StringColumn, BoolColumn, Int64Column, Float64Column. Is there such a thing as "TimeseriesColumn" ? I can't find it in the documentation. Should I make one ? The server closes the connection forcibly when this method is called:
// Push to db
err := sender.Table("urls").
   Symbol("ticker", ticker).
   StringColumn("start", dp.Start.Format(TimeLayout)).
   StringColumn("end", dp.End.Format(TimeLayout)).
   StringColumn("url", u.String()).
   BoolColumn("done", false).
   At(ctx, time.Now().UnixNano())
How would one correct this statement? Any examples would be of massive help.
2:00 AM
Just in case anyone else in the future comes across this problem, I solved it by making a table with the required timestamp columns to be of type "timestamp", and inserting into the table using your specified date.UnixMicro(). That did the trick. For reference:
err := sender.Table("urls").
				Symbol("ticker", ticker).
				Int64Column("start", dp.Start.UnixMicro()).
				Int64Column("end", dp.End.UnixMicro()).
				StringColumn("url", u.String()).
				BoolColumn("done", false).
				At(ctx, time.Now().UnixNano())
Jaromir Hamala

Jaromir Hamala

09/05/2022, 7:08 AM
hello Shriram, that’s a known issue in the golang client: https://github.com/questdb/go-questdb-client/issues/2 your workaround is clever!
s

Shriram Sunder

09/05/2022, 2:48 PM
Hi Jaromir, thanks for pointing out the release candidates! I'll check them out.
Jaromir Hamala

Jaromir Hamala

09/12/2022, 11:48 AM
hello @Shriram Sunder FYI @Andrey Pechkurov just released a new version of the golang ILP client and it includes the new function for adding timestamp columns. https://github.com/questdb/go-questdb-client/releases/tag/1.0.2 once more thanks for the final nudge to implement this! 😃