I want to import csv file into QuestDb table with designated timestamp column. I have to specify that one of the column is not a String but a Timestamp which I as
import requests
schema = '[{"name":"date", "type": "Timestamp", "pattern":"yyyy-MM-dd"}]'
with open('..\HavCases.csv', 'rb') as f:
r = requests.post(r'http://localhost:9000/imp?name=table3&overwrite=true×tamp=date',
files={'schema': schema,'data': f})
print(r.text)
but date column keep coming back as STRING and response is
not a timestamp 'date'
when I remove ×tamp from URL I see column parsed as STRING, not Timestamp
+-----------------------------------------------------------------------------------------------------------------+
| Location: | table3 | Pattern | Locale | Errors |
| Partition by | NONE | | | |
| Timestamp | NONE | | | |
+-----------------------------------------------------------------------------------------------------------------+
| Rows handled | 780 | | | |
| Rows imported | 780 | | | |
+-----------------------------------------------------------------------------------------------------------------+
...
| 9 | date | STRING | 0 |