Once I have an existing table in QuestDB, is there any way to check if the table has a designated timestamp and if yes, which column is it?
Asked
Active
Viewed 69 times
2 Answers
1
This is possible as of version 6.0 using tables()
and table_columns()
. The following is an example which returns the schema of a table, including which column is set as a designated timestamp:
table_columns('my_table')
column | type | indexed | indexBlockCapacity | symbolCached | symbolCapacity | designated |
---|---|---|---|---|---|---|
symb | SYMBOL | true | 1048576 | false | 256 | false |
price | DOUBLE | false | 0 | false | 0 | false |
ts | TIMESTAMP | false | 0 | false | 0 | true |
s | STRING | false | 0 | false | 0 | false |
For more information, see the documentation for table meta functions

Brian Smith
- 1,222
- 7
- 17