quasardb CSV generator tool¶
Introduction¶
qdb_csv_generator generates CSV files with random values. The timestamp used can be steady in order to have a file that can be realistically imported (with qdb_import).
For example, this command generated a file of 50 megabytes with three columns (one timestamp, on int and one blob) in which the consecutive timestamps are separated by 250 milliseconds:
qdb_csv_generator --file generated_data.csv --size 50MB --parsers 'datetime int64 blob' --ts-offset 250ms
Quick Reference¶
Option
Usage
display help
display information about the parsers
display the build version and date
display additional information at runtime
specify the generated file
specify the file’s size in KB, MB or GB
specify the parsers corresponding to each column
specify the offset between each line’s timestamp
add dummy column names in the first line
use tabulations to separate values
Program Options¶
-
-h
,
--help
¶
Displays help about the program’s options.
-
--help-parsers
¶
Displays information about the available parsers (described in quasardb import tool).
-
--version
¶
Displays the build version and date.
-
--verbose
¶
Displays additional information at runtime.
-
-f
,
--file
=<path_to_file>
¶ Specifies the generated CSV file.
- Argument
The file’s name.
-
-s
,
--size
=<file_size>
¶ Specifies the file’s maximum size.
- Argument
The file’s maximum size. Available units: b, Kb, Mb, Gb, Kib, Mib, Gib, B, KB, MB, GB, KiB, MiB and GiB.
-
-p
,
--parsers
=<parsers_list>
¶ Specifies the values format for each column by giving the corresponding parsers.
- Argument
The parsers used for each column’s value, separated by spaces. Available parsers: datetime, iso_8601, date, time, epoch, epoch_ms, epoch_ns, int64, double, blob and quoted_blob.
-
--ts-offset
=<time_offset>
¶ Specifies the offset between consecutive timestamps. The timestamp values correspond to the first timestamp parser given: if “–parsers ‘int64 iso_8601 blob’” is given, then the timestamps are the values of the second column.
- Argument
The consecutive timestamps’s offset. Available units: ns, ms, s, min, h, d, w, mon and y.
-
--add-header
¶
Add dummy column names in the first line, such as “col-0,col-1,…”.
-
--tsv
¶
Use tabulations instead of commas to separate the values.