If you don't have data files around to play with QuestDB, you can get test data in two ways.
Sample data files
We encourage you to test QuestDB with your own data. If, however, you do not have data available and would like to test QuestDB with test data, you can use some of the following test files:
Simply download & extract the file. We recommend you do this in the
The following will generate a series of timestamps "ts" and random doubles as "asks"
SELECT timestamp_sequence(to_timestamp('2019-10-17T00:00:00', 'yyyy-MM-ddTHH:mm:ss'), 100000L) ts, rnd_double() ask FROM long_sequence(100);
In addition, you can use the above to
CREATE TABLE on the fly:
CREATE TABLE asks AS ( SELECT timestamp_sequence(to_timestamp('2019-10-17T00:00:00', 'yyyy-MM-ddTHH:mm:ss'), 100000L) ts, rnd_double() ask FROM long_sequence(100) ) TIMESTAMP(ts);
Note that the query of the first example can be used within a
CREATE TABLEstatement. In addition, we use
tsas the timestamp column in this new table which will be used for partitioning and time-series related queries (ASOF joins, SPLICE joins etc)
CREATE TABLE test AS (SELECT rnd_str(2,2,0) name, rnd_double() reading FROM long_sequence(100));