Serializes binary _txn file to / from readable JSON format. Primary usage to
investigate storage issues
io.questdb.cliutil.TxSerializer -d <txn_path> | -s <json_path> <txn_path>
-doption prints contents of_txnfile to std output in JSON format-soption transforms existing JSON file into binary _txn format
java -cp utils.jar io.questdb.cliutil.TxSerializer -d /questdb-root/db/trades-COINBASE/_txn > /questdb-root/db/trades-COINBASE/txn.json
java -cp utils.jar io.questdb.cliutil.TxSerializer -s /questdb-root/db/trades-COINBASE/txn.json /questdb-root/db/trades-COINBASE/_txnCopyRebuilds table indexes
io.questdb.cliutil.RebuildIndex <table_path> [-p <partition_name>] [-c <column_name>]
<table_path>full path to the table-ccolumn name, optional. If omitted, all indexed columns will have indexes rebuilt-poptional partition name. If omitted, all partitions will be affected
java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE
java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE -c symbol
java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE -p 2022-03-21
java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE -p 2022-03-21 -c symbolRebuilds String column .i file from .d file, helpful when .i file is corrupted
io.questdb.cliutil.RecoverVarIndex <table_path> [-p <partition_name>] [-c <column_name>]
<table_path>full path to the table-ccolumn name, optional. If omitted, all string columns will have.ifile rebuild-poptional partition name. If omitted, all partitions will be affected
java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE
java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE -c stringColumn
java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE -p 2022-03-21
java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE -p 2022-03-21 -c stringColumnCopies all the data from one QuestDB instance to another. Uses Postgres wire to select the data and ILP to insert it. Useful to migrate data to the running instance.
io.questdb.cliutil.Table2Ilp -d <destination_table_name> -dc <destination_ilp_host_port> -s <source_select_query> -sc <source_pg_connection_string>
[-sts <timestamp_column>] [-sym <symbol_columns>] [-dauth <ilp_auth_key:ilp_auth_token>] [-dtls]
-ddestination table name-dilpdestination ILP connection string, e.g.https::addr=localhost:9000;username=admin;password=quest;-ssource select query, e.g.tradesortrades WHERE timestamp in '2021-01'-scsource connection string, e.g.jdbc:pgsql://localhost:8812/qdb-stssource designated timestamp column name, defaults totimestamp-symcomma separated list of symbol columns, e.g.symbol,exchange
java -cp utils.jar io.questdb.cliutil.Table2Ilp -d trades -dilp "https::addr=localhost:9000;username=admin;password=quest;" -s "trades WHERE start_time in '2022-06'" \
-sc "jdbc:postgresql://localhost:9812/qdb?user=account&password=secret&ssl=false" \
-sym "ticker,exchagne" -sts start_time
To build single jar with dependencies run
mvn clean package